Gamma API

Get a form template upload URL

POST
/api/projects/{projectId}/form-templates/upload-url

Where to PUT a PDF for a new template, or a new version of one. The file goes to the organization's own storage if it has one.

Who may call it: Anyone on the project whose permission profile allows form-template.create. API keys: yes, given form-template.create for this project.

Authorization

cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

projectId*string

The project's id.

Request Body

application/json
  1. body
fileName*string
Match^[^/\\]+$
Length1 <= length <= 255
sizeBytes*integer

At most 50 MB.

Range0 < value <= 9007199254740991

Response Body

OK.

application/json
  1. response
url*string

PUT the file's bytes here.

Formaturi
fileKey*string

Pass with the file name to create the template, or its next version, once the upload is done.

expiresAt*string

When url stops working: an hour.

Formatdate-time
Example Request
curl -X POST 'http://localhost:3000/api/projects/string/form-templates/upload-url' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "string",  "sizeBytes": 1}'
Example Response
{  "url": "http://example.com",  "fileKey": "string",  "expiresAt": "2019-08-24T14:15:22Z"}