InyokeDocs

Authentication

Every call carries an API key. A key works as the person who made it.

Create a key

In Inyoke, open Settings, then API keys. Name the key and choose its access:

AccessWhat it can do
ReadList campaigns and lists, read imports, and check leads on a campaign.
Read and writeEverything Read can, plus add leads, import files and remove leads.

The key starts with sk_live_ and is shown once. Keep it on your server, never in a browser or an app.

You can revoke a key from the same page at any time. An agency owner sees every key in the agency and can revoke any of them.

Send the key

Send the key in an Authorization header:

curl "https://www.inyoke.com/api/v1/campaigns" \
  -H "Authorization: Bearer $API_KEY"

An x-api-key: <key> header works too.

What a key can reach

A key works as you do: it sees what you see and can only do what you can. A call goes through only when all of these are true:

  • The key is live, and you and your agency are active.
  • You have the Use the lead API permission. An agency owner gives it under Agency, then Roles.
  • You have nothing left to finish in Inyoke first, such as an agreement to accept or a licence to verify. The error's gate says which.
  • The key has the call's access: Read, or Read and write.
  • You have the permission the call names, if it names one. Adding leads and importing need Import leads. Removing leads needs Create campaigns with See campaigns set to Everyone's.

A campaign's name is shown to someone who may see that campaign (everyone's campaigns, or the ones they or their downline created, depending on their role). Any other campaign gets the label Agency Campaign, numbered (Agency Campaign 1, Agency Campaign 2) when there is more than one. The label can change when campaigns are added, archived or renamed, so always refer to a campaign by its id.

When a key is refused

StatusCodeWhy
401unauthorizedNo key was sent, or it can't be used: it doesn't exist, it was revoked, or its holder or agency is no longer active. The answer is the same for each, on purpose.
403forbiddenYou're missing a permission the call needs, or the key doesn't have the access. The message says which.
403gatedYou have something to finish in Inyoke first. gate names the step.

See Errors for every code.

On this page