Create Brand and Consent via API

Hi,
In the docs it says you can auto approve a brand by including skipInvite: true in the Json request
When I tried that I got an error with the message
“should NOT have additional properties”
How do I auto approve the Brand via the API
Thanks in advance for any help given
Tony

Hi Tony,

The endpoint for that only works in the Live environment, the test environment creates brand with consent given by default. So you’ll have to create a Brand and a Program using your live API key, the one that starts with sk_live_.

curl -X POST https://api.fidel.uk/v1/brands \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_live_key' \
  -d '{
    "name": "No Consent Brand"
  }'
  curl -X POST https://api.fidel.uk/v1/programs \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_live_key' \
  -d '{
    "name": "Live Program"
  }'

After you’ve created a Brand and a Program using your Live API Key, you can use the Create Brand User endpoint, and that endpoint accepts the skipInvite parameter.

curl -X POST \
https://api.fidel.uk/v1/brands/{brandId}/programs/{programId}/users \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_live_key' \
  -d '{
    "email": "email@fidel.uk",
    "nameFirst": "Alex",
    "nameLast": "Lakatos",
    "title": "DevRel",
    "skipInvite": true
}'

I’ll update the docs as well, thanks for reaching out!