SendSeven GmbH API Tokens API

Create and manage scoped API tokens for programmatic access to the SendSeven API.

GitHub OpenAPI

Operations 7

GET /api/v1/api-tokens List Api Tokens #
POST /api/v1/api-tokens Create Api Token #
GET /api/v1/api-tokens/available-scopes Get Available Scopes For Token #
GET /api/v1/api-tokens/{token_id} Get Api Token #
PATCH /api/v1/api-tokens/{token_id} Update Api Token #
DELETE /api/v1/api-tokens/{token_id} Revoke Api Token #
POST /api/v1/api-tokens/{token_id}/regenerate Regenerate Api Token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sendseven-com:sendseven-com-api-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sendseven-com-api-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SendSeven API Tokens API
  description: Unified messaging API for WhatsApp, Telegram, SMS, and more
  version: '20261124.1227'
servers:
- url: https://api.sendseven.com
  description: Production
tags:
- name: API Tokens
  description: Create and manage scoped API tokens for programmatic access to the SendSeven API.
paths:
  /api/v1/api-tokens:
    get:
      tags:
      - API Tokens
      summary: List Api Tokens
      description: 'List all API tokens for current user in this tenant.


        **Required Scopes:** `api:read`


        By default, only shows active (non-expired, non-revoked) tokens.

        Set include_inactive=true to see all tokens.'
      operationId: list_api_tokens_api_v1_api_tokens_get
      security:
      - HTTPBearer: []
      parameters:
      - name: include_inactive
        in: query
        required: false
        schema:
          type: boolean
          description: Include inactive/expired tokens
          default: false
          title: Include Inactive
        description: Include inactive/expired tokens
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number (1-indexed)
          default: 1
          title: Page
        description: Page number (1-indexed)
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Items per page
          default: 20
          title: Page Size
        description: Items per page
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - API Tokens
      summary: Create Api Token
      description: 'Create a new API token.


        **Required Scopes:** `api:create`


        IMPORTANT: The plaintext token is returned ONLY ONCE.

        Save it securely - you won''t be able to retrieve it again.


        Token format: s7_api_


        Expiry: set at most ONE of

        - `expires_in_days` (>= 1, no maximum)

        - `expires_at` (any future ISO-8601 instant; no offset = UTC)

        - `never_expires: true` (token never expires, `expires_at` is null)


        More than one, or an `expires_at` that is not in the future, returns 422.

        None set: the token expires in 90 days.'
      operationId: create_api_token_api_v1_api_tokens_post
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiTokenCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenCreated'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/api-tokens/available-scopes:
    get:
      tags:
      - API Tokens
      summary: Get Available Scopes For Token
      description: 'Get all scopes that the current user can grant to API tokens.


        **Required Scopes:** `api:read`


        This endpoint expands wildcard scopes (*:*, resource:*, etc.) to show

        all granular scopes the user can select when creating tokens.


        Example:

        - User has [''*:*''] -> Returns all 78 scopes

        - User has [''campaigns:*''] -> Returns all campaigns:* scopes

        - User has [''contacts:read'', ''messages:create''] -> Returns exactly those scopes'
      operationId: get_available_scopes_for_token_api_v1_api_tokens_available_scopes_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailableTokenScopesResponse'
      security:
      - HTTPBearer: []
  /api/v1/api-tokens/{token_id}:
    get:
      tags:
      - API Tokens
      summary: Get Api Token
      description: 'Get details of a specific API token.


        **Required Scopes:** `api:read`


        Note: The plaintext token is NOT included - it was only shown at creation.'
      operationId: get_api_token_api_v1_api_tokens__token_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - API Tokens
      summary: Update Api Token
      description: 'Update an API token''s name, active state or expiry.


        **Required Scopes:** `api:create`


        Can update:

        - name: Change the human-readable name

        - is_active: Revoke (false) or reactivate (true) the token

        - expiry: set at most ONE of `expires_in_days` (>= 1, no maximum),

        `expires_at` (any future ISO-8601 instant; no offset = UTC) or

        `never_expires: true`. More than one, or a past `expires_at`, returns

        422. None sent = expiry unchanged. Also works on an expired token to

        give it a new future expiry. The new expiry takes effect immediately.


        Cannot update (create a new token instead):

        - scopes'
      operationId: update_api_token_api_v1_api_tokens__token_id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiTokenUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - API Tokens
      summary: Revoke Api Token
      description: 'Revoke (delete) an API token permanently.


        **Required Scopes:** `api:delete`


        This permanently deletes the token.

        Alternatively, use PATCH to set is_active=false to soft-revoke.'
      operationId: revoke_api_token_api_v1_api_tokens__token_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/api-tokens/{token_id}/regenerate:
    post:
      tags:
      - API Tokens
      summary: Regenerate Api Token
      description: 'Regenerate an API token (new token string, same scopes).


        **Required Scopes:** `api:create`


        This creates a new token string while keeping the same:

        - Name

        - Scopes


        Expiry (optional JSON body): set at most ONE of `expires_in_days`,

        `expires_at` or `never_expires`, same rules as create. Without a body

        (or with no option set) the token keeps its current expiry, unless that

        expiry is already in the past: then it gets the default 90 days from now,

        so the new token is not born expired.


        The old token is immediately revoked.

        IMPORTANT: Save the new token - it will only be shown once.'
      operationId: regenerate_api_token_api_v1_api_tokens__token_id__regenerate_post
      security:
      - HTTPBearer: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/ApiTokenRegenerate'
              - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenCreated'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PaginationMeta:
      properties:
        total:
          type: integer
          title: Total
          description: Total number of items matching the query
        page:
          type: integer
          minimum: 1.0
          title: Page
          description: Current page number (1-indexed)
        page_size:
          type: integer
          minimum: 1.0
          title: Page Size
          description: Number of items per page
        total_pages:
          type: integer
          title: Total Pages
          description: Total number of pages
        has_next:
          type: boolean
          title: Has Next
          description: Whether there are more pages
        has_prev:
          type: boolean
          title: Has Prev
          description: Whether there are previous pages
        next_cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Next Cursor
          description: Cursor for next page (if using cursor pagination)
        prev_cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Prev Cursor
          description: Cursor for previous page
      type: object
      required:
      - total
      - page
      - page_size
      - total_pages
      - has_next
      - has_prev
      title: PaginationMeta
      description: 'Pagination metadata for list responses.


        Supports both offset-based and page-based pagination.

        Clients should use page/page_size for new implementations.'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    AvailableTokenScopesResponse:
      properties:
        scopes:
          items:
            type: string
          type: array
          title: Scopes
          description: Flat list of all grantable scope strings
        grouped:
          additionalProperties:
            items:
              $ref: '#/components/schemas/TokenScopeInfo'
            type: array
          type: object
          title: Grouped
          description: Scopes grouped by resource for UI display
        total:
          type: integer
          title: Total
          description: Total number of grantable scopes
      type: object
      required:
      - scopes
      - grouped
      - total
      title: AvailableTokenScopesResponse
      description: 'Response containing all scopes the user can grant to API tokens.


        This expands wildcard scopes to show all granular scopes available.

        User with ''*:*'' will see all 78 scopes.

        User with ''campaigns:*'' will see all campaigns:* scopes.'
      example:
        grouped:
          campaigns:
          - action: read
            description: View campaigns
            scope: campaigns:read
          - action: create
            description: Create campaigns
            scope: campaigns:create
          contacts:
          - action: read
            description: View contacts
            scope: contacts:read
        scopes:
        - campaigns:read
        - campaigns:create
        - contacts:read
        total: 3
    ApiTokenRegenerate:
      properties:
        expires_in_days:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Expires In Days
          description: Token lifetime in days from now (minimum 1, no maximum)
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
          description: Exact expiry instant (ISO-8601, must be in the future; a value without a timezone offset is read as UTC)
        never_expires:
          type: boolean
          title: Never Expires
          description: Set to true for a token that never expires
          default: false
      type: object
      title: ApiTokenRegenerate
      description: 'Optional body for ``POST /api-tokens/{id}/regenerate``.


        No body / no option: the token keeps its current expiry, unless that

        expiry is already in the past, in which case the default (90 days from

        now) applies so the new token is not born expired.'
      example:
        expires_in_days: 90
    ApiTokenListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ApiTokenResponse'
          type: array
          title: Items
          description: List of items for this page
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
          description: Pagination metadata
      type: object
      required:
      - items
      - pagination
      title: ApiTokenListResponse
      description: "Paginated list of API tokens.\n\nExample response:\n```json\n{\n    \"items\": [...],\n    \"pagination\": {\n        \"total\": 5,\n        \"page\": 1,\n        \"page_size\": 20,\n        \"total_pages\": 1,\n        \"has_next\": false,\n        \"has_prev\": false\n    }\n}\n```"
    TokenScopeInfo:
      properties:
        scope:
          type: string
          title: Scope
          description: Full scope identifier (e.g., 'campaigns:read')
        action:
          type: string
          title: Action
          description: Action part of the scope (e.g., 'read')
        description:
          type: string
          title: Description
          description: Human-readable description of the scope
      type: object
      required:
      - scope
      - action
      - description
      title: TokenScopeInfo
      description: Information about a single scope available for token creation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApiTokenCreated:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier (UUID)
        tenant_id:
          type: string
          title: Tenant Id
          description: Tenant this token belongs to
        user_id:
          type: string
          title: User Id
          description: User who created this token
        name:
          type: string
          title: Name
          description: Human-readable name for this token
        token:
          type: string
          title: Token
          description: Plaintext token - shown only once!
        scopes:
          items:
            type: string
          type: array
          title: Scopes
          description: Scopes granted to this token
        created_at:
          type: string
          title: Created At
          description: When the token was created (UTC)
        expires_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires At
          description: When the token expires (UTC); null = never expires
        warning:
          type: string
          title: Warning
          description: Security warning
          default: Save this token now - it will not be shown again
      type: object
      required:
      - id
      - tenant_id
      - user_id
      - name
      - token
      - created_at
      title: ApiTokenCreated
      description: 'Response when token is first created.


        IMPORTANT: The plaintext token is returned ONLY ONCE here.

        Save it securely - you won''t be able to retrieve it again.


        Token format: s7_api_<32_random_hex_chars>'
      example:
        created_at: '2025-01-01T00:00:00Z'
        expires_at: '2025-04-01T00:00:00Z'
        id: t1a2b3c4-d5e6-f7g8-h9i0-j1k2l3m4n5o6
        name: CI/CD Pipeline Token
        scopes:
        - campaigns:update
        - email:read
        - contacts:read
        tenant_id: tenant-123
        token: s7_api_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6
        user_id: user-456
        warning: Save this token now - it will not be shown again
    ApiTokenResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier (UUID)
        tenant_id:
          type: string
          title: Tenant Id
          description: Tenant this token belongs to
        user_id:
          type: string
          title: User Id
          description: User who created this token
        name:
          type: string
          title: Name
          description: Human-readable name for this token
        scopes:
          items:
            type: string
          type: array
          title: Scopes
          description: Scopes granted to this token
        last_used_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Used At
          description: When the token was last used (UTC)
        created_at:
          type: string
          title: Created At
          description: When the token was created (UTC)
        expires_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires At
          description: When the token expires (UTC); null = never expires
        is_active:
          type: boolean
          title: Is Active
          description: Whether the token is active
      type: object
      required:
      - id
      - tenant_id
      - user_id
      - name
      - created_at
      - is_active
      title: ApiTokenResponse
      description: 'API token response (plaintext token NOT included).


        This is the standard response for listing and viewing tokens.

        The plaintext token is only shown once at creation time.'
      example:
        created_at: '2025-01-01T00:00:00Z'
        expires_at: '2025-04-01T00:00:00Z'
        id: t1a2b3c4-d5e6-f7g8-h9i0-j1k2l3m4n5o6
        is_active: true
        last_used_at: '2025-01-15T10:30:00Z'
        name: CI/CD Pipeline Token
        scopes:
        - campaigns:update
        - email:read
        - contacts:read
        tenant_id: tenant-123
        user_id: user-456
    ApiTokenUpdate:
      properties:
        expires_in_days:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Expires In Days
          description: Token lifetime in days from now (minimum 1, no maximum)
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
          description: Exact expiry instant (ISO-8601, must be in the future; a value without a timezone offset is read as UTC)
        never_expires:
          type: boolean
          title: Never Expires
          description: Set to true for a token that never expires
          default: false
        name:
          anyOf:
          - type: string
            maxLength: 100
            minLength: 3
          - type: 'null'
          title: Name
          description: Human-readable name for this token
        is_active:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Active
          description: Set to false to revoke token, true to reactivate
      type: object
      title: ApiTokenUpdate
      description: "Schema for updating an API token.\n\nCan update:\n- name: Change the human-readable name\n- is_active: Revoke (false) or reactivate (true) the token\n- expiry: at most one of expires_in_days / expires_at / never_expires\n  (none sent = expiry unchanged). Works on an expired token too, to give\n  it a new future expiry.\n\nCannot update (create a new token instead):\n- scopes"
      example:
        expires_in_days: 180
        is_active: true
        name: Updated CI/CD Token
    ApiTokenCreate:
      properties:
        expires_in_days:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Expires In Days
          description: Token lifetime in days from now (minimum 1, no maximum)
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
          description: Exact expiry instant (ISO-8601, must be in the future; a value without a timezone offset is read as UTC)
        never_expires:
          type: boolean
          title: Never Expires
          description: Set to true for a token that never expires
          default: false
        name:
          type: string
          maxLength: 100
          minLength: 3
          title: Name
          description: Human-readable name for this token
        scopes:
          items:
            type: string
          type: array
          minItems: 1
          title: Scopes
          description: Scopes granted to this token (must be subset of user's scopes)
      type: object
      required:
      - name
      - scopes
      title: ApiTokenCreate
      description: 'Schema for creating a new API token.


        Important: User can only grant scopes they have permission for.

        Expiry: set at most one of ``expires_in_days``, ``expires_at`` or

        ``never_expires``. None set = 90 days. There is no maximum.'
      example:
        expires_in_days: 90
        name: CI/CD Pipeline Token
        scopes:
        - campaigns:update
        - email:read
        - contacts:read
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer