Skip to main content

Authentication

The Animo API uses Laravel Passport (OAuth2) with bearer tokens. Every request to /api/v1/* must include a valid access token.

Sending the token

Include the token in the Authorization header:
GET /api/v1/user HTTP/1.1
Host: {your-domain}
Authorization: Bearer {access_token}
Accept: application/json

Obtaining a token

  1. Sign in to Animo as the user whose data the integration will access.
  2. Open the admin panel and navigate to user API token settings.
  3. Create a new personal access token and select the required scopes.
  4. Copy the token immediately — it is shown only once.
Personal access tokens expire after one year (Passport::personalAccessTokensExpireIn).

OAuth2 authorization code flow

For third-party apps that act on behalf of users:
  1. Register an OAuth client in Passport.
  2. Redirect the user to authorize:
    GET /api/oauth/authorize
    
  3. Exchange the authorization code for an access token:
    POST /api/oauth/token
    Content-Type: application/json
    
    {
      "grant_type": "authorization_code",
      "client_id": "{client_id}",
      "client_secret": "{client_secret}",
      "redirect_uri": "{redirect_uri}",
      "code": "{authorization_code}"
    }
    
OAuth routes are mounted at /api/oauth.

Token refresh

Authenticated users can refresh tokens via:
POST /api/oauth/token/refresh
(Requires an active web session.)

Default scopes

When creating a token without explicitly selecting scopes, these are granted by default:
ScopeDescription
user:readRetrieve the user info
companies:readGet the companies available to user

All scopes

ScopeDescription
user:readRetrieve the user info
companies:readGet the companies available to user
activations:readAccess activations and the submissions and leads through them
activations:subscribeSubscribe to activation events (new submissions)
events:readAccess events from the companies of the user
events:createCreate new events for the companies of the user
events:updateUpdate events belonging to the companies of the user
events:deleteDelete events belonging to the companies of the user
forms:readAccess forms from the companies of the user
forms:createCreate form on any of the user’s companies
forms:updateModify forms on any of the user’s companies
forms:deleteDelete any of the forms available on the the user’s companies
leads:readAccess leads from the companies of the user
leads:subscribeSubscribe to lead events (creation, update, deletion)
meetings:readAccess booked meetings and the submissions and leads through them
meetings:subscribeSubscribe to meeting events (new bookings, cancellations, no-show, ratings…)
orders:readAccess the list of orders for any of the events organized by the user’s companies
orders:cancelAllow to cancel free orders for any of the events organized by the user’s companies
orders:curateApprove or deny any pending orders from the users events
orders:createRegister tickets on the name of your attendees from the API.
submissions:readAccess submissions from leads belonging to companies of the user
submissions:subscribeSubscribe to submission events (new submissions)
ticket-types:readAccess ticket types from the events of the user
ticket-types:createCreate ticket types on any of the user’s events
ticket-types:updateModify ticket types on any of the user’s events
ticket-types:deleteDelete ticket types available on the the user’s events
Note: Scopes leads:read, submissions:read, and meetings:read are registered but have no matching GET endpoints yet.

Plan requirement

API access requires an active Pro plan on each company you integrate with. Manage billing at https://app.animo.co/admin/settings/billing.
Internal gateAnimo planGrants
USE_APIProAll company-scoped REST endpoints
USE_INTEGRATIONSProWebhook attach/update/detach
Without Pro:
  • GET /api/v1/companies returns 200 with an empty data array (easy to misread as “no companies”)
  • Direct calls to /api/v1/{company}/… return 403

Scope requirements per route group

Routes enforce scopes via middleware. A token must include the scope listed on each endpoint. Company-scoped routes additionally require the Pro plan (USE_API gate). Webhook endpoints also require the Integrations feature (USE_INTEGRATIONS gate).

Error responses

StatusMeaning
401 UnauthorizedMissing, expired, or invalid token
403 ForbiddenValid token but missing required scope, subscription gate, or policy denial