Skip to main content
POST
/
contracts
Create a contract. Calls the service that generates the contract documents.
curl --request POST \
  --url https://v2.firstpromoter.com/api/v2/company/contracts \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "checkbox_label": "<string>",
  "content_hosted": true,
  "content": "<string>",
  "external_link": "<string>",
  "campaign_ids": [
    123
  ]
}'

Authorizations

Authorization
string
header
required

Access token passed as a Bearer token in the Authorization header

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Example:

"acc_123456"

Body

application/json
name
string
required

The name of the contract

checkbox_label
string
required

The checkbox label

content_hosted
boolean
required

True if "Hosted inside FirstPromoter (recommended)" is selected, False if "External link" is selected

content
string

Content. Required if "content_hosted" == true

The external T&C link. Required if "content_hosted" == false

campaign_ids
integer[]

The selected campaign ids

Response

401

Unauthorized

I