This section describes how to get started and make your first calls to the Plotto API.


First, follow these steps to sign up for a Plotto account.

  1. In a browser, navigate to the Plotto home page and click on Login. 
  2. Create a new account on Plotto by clicking activate new account (sign-up).
  3. You will be prompted to request an invitation to receive a Plotto account. Fill in the form and click Request Invitation.
  4. If approved, you will receive an email address with a link and a code. Click on the link and fill out the form. Make sure you know your email and password, since you will need them when using the API. Click Register.
  • Note: in the coming version, the access token will be obtained also through Application APIKeys, obtained from Account Dashboard. 
  • Congratulations! You now have a Plotto account.

  • Next, follow these steps to make your first API call.


    1. First, you need an access token. Using a REST client or curl, make the following POST request:

      

    POST https://api.plotto.com/oauth/token
    
    Headers:
      Content-Type: application/json
    
    POST Body:
    {
      "grant_type": "password",
      "client_id": "0",
      "client_secret": "#",
      "username": "<your username>",
      "password": "<your password>"
    }

      

    Where it says <your username>, put your email address that you used to register with Plotto, and where it says <your password>, put your Plotto password.

    You will see JSON returned that contains an access token. It will look something like this:

      

    {
      "access_token": "<access token>",
      "refresh_token": "<refresh token>",
      "expires_in": 3600,
      "user": {
      "name": "Your Name",
      "email": "you@your-company.com",
      "admin": false,
      "youTubeAuthorized": false
      },
      "token_type": "Bearer"
    }

      


    2. Now, make an API request to create a new project. Using a REST client or curl, make the following POST request, putting in the access token from the previous response.

       

    Create a new projecthttp://developer.plotto.com/#create-project

    curl -X POST 'https://api.plotto.com/project/create' -H 'Authorization: Bearer c3e91376ff26ca85d8dcfbe5835b9a6f9b989025bfd32ddc750e7caf7862a687' -H 'Content-Type: application/json' -d '{"name":"This is the first project"}'

       

    You should see JSON returned with the new project ID:

      #projectID 575e57b905bd1c2a053f492c

    {
      "data": "<new project ID>"
    }

      

    In order to verify that you created a new project, go back to your browser and navigate to the projects page (https://web.plotto.com/projects). If necessary, log in. You should see your new project listed. 


    3. Create a new Video Request (cta)
    http://developer.plotto.com/#create-cta

    curl -X POST 'https://api.plotto.com/project/cta/create' -H 'Authorization: Bearer c3e91376ff26ca85d8dcfbe5835b9a6f9b989025bfd32ddc750e7caf7862a687' -H 'Content-Type: application/json' -d '{"projectId":"575e57b905bd1c2a053f492c"}'

      #Store the cta id from the response

      #ctaId 575e57c705bd1c2a053f492d


    4. Upload a new contribution   

    ### 4.1. Create new contribution - http://developer.plotto.com/#create-contribution
    
    curl -X POST 'https://api.plotto.com/landing/contribution/create' -H 'Content-Type: application/json' -d '{"projectId":"575e57b905bd1c2a053f492c","ctaId":"575e57c705bd1c2a053f492d","email":"<contributor.email@domain.com>"}'
    
    #Store the contribution id from the response
    #contributionId 575e57d505bd1c2a053f492f
    
    ### 4.2. Create new upload - http://developer.plotto.com/#create-upload-job
    #use the fileName as 'contrib_<contributionId>.<file_extension>'
    
    curl -X POST 'https://api.plotto.com/upload/create' -H 'Content-Type: application/json' -d '{"projectId":"575e57b905bd1c2a053f492c","ctaId":"575e57c705bd1c2a053f492d","contributionId":"575e57d505bd1c2a053f492f","files":[{"type":"video","name":"contrib_575e57d505bd1c2a053f492f.mov"}]}'
    
    #Store the upload id
    #uploadId 575e57e705bd1c2a053f4930
    
    ### 4.3. Get the upload url - http://developer.plotto.com/#get-upload-url
    
    curl -X GET 'https://api.plotto.com/upload/aws-s3-sign-url?fileName=contrib_575e57d505bd1c2a053f492f.mov&fileType=video/quicktime'
    
    #Store the upload url
    #https://plt-prd-worker-source.s3-eu-west-1.amazonaws.com/contrib_575e57d505bd1c2a053f492f.mov?AWSAccessKeyId=AKIAJZLUXKJP6PCGZGDA&Content-Type=video%2Fquicktime&Expires=1465801504&Signature=0NEG27KTt6dY8sTioS97EfxKo%2Bk%3D&x-amz-acl=bucket-owner-full-control
    
    ### 4.4. Upload the file using "x-amz-acl: bucket-owner-full-control" and "Content-Type: <your-file-mime-type>" headers
    
    curl -X PUT 'https://plt-prd-worker-source.s3-eu-west-1.amazonaws.com/contrib_575e57d505bd1c2a053f492f.mov?AWSAccessKeyId=AKIAJZLUXKJP6PCGZGDA&Content-Type=video%2Fquicktime&Expires=1465801504&Signature=0NEG27KTt6dY8sTioS97EfxKo%2Bk%3D&x-amz-acl=bucket-owner-full-control' -H "Content-Type: video/quicktime" -H "x-amz-acl: bucket-owner-full-control" -T your-local-file.mov
    
    ### 4.5. Submit the upload (after the file is uploaded) - http://developer.plotto.com/#submit-upload
    
    curl -X POST 'https://api.plotto.com/upload/submit' -H 'Content-Type: application/json' -d '{"uploadId":"575e57e705bd1c2a053f4930"}'

      

    Starting with next version (July) steps 4.1., 4.2, 4.3 could be done, optionally, in one API call.