> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smokeball.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accept an invitation

> Server-to-server clients only. Creates the invited person's login under the invited email
address, with a user id derived from the invitation, and registers it with the firm; omit
`password` to have the identity provider email them a way to set one. Repeating the request,
even after the invitation's expiry, answers the same reply and creates the login once.



## OpenAPI

````yaml /openapi.json post /invitations/{id}/accept
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /invitations/{id}/accept:
    post:
      tags:
        - Invitations
      summary: Accept an invitation
      description: "Server-to-server clients only. Creates the invited person's login under the invited email\r\naddress, with a user id derived from the invitation, and registers it with the firm; omit\r\n`password` to have the identity provider email them a way to set one. Repeating the request,\r\neven after the invitation's expiry, answers the same reply and creates the login once."
      operationId: AcceptInvitationAsync
      parameters:
        - name: id
          in: path
          description: Unique identifier of the invitation to accept.
          required: true
          schema:
            type: string
      requestBody:
        description: The credential to create the login with.
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AcceptInvitationDto'
              description: The credential the invited person's login is created with.
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AcceptInvitationDto'
              description: The credential the invited person's login is created with.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AcceptInvitationDto'
              description: The credential the invited person's login is created with.
      responses:
        '202':
          description: >-
            When the request is accepted. Returns a hypermedia 'Link' object of
            the user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: >-
            When the invitation expired or was cancelled ('Invitation is no
            longer valid'), was accepted by another login ('Invitation has
            already been accepted'), a login already exists for the invited
            email address ('Email address has already been registered'), the
            identity provider refused the credential ('Login could not be
            created'), or the login is already registered with the firm
            ('Already registered with this firm').
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            When the authenticated client is not a server-to-server client or
            carries no firm account (both bodyless).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: >-
            When no invitation with the specified id exists for this account
            ('Invitation not found').
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    AcceptInvitationDto:
      type: object
      properties:
        password:
          type: string
          description: >-
            Password with a lowercase, uppercase, numeric and special character;
            omit it to have the identity provider email the person a way to set
            one.
          nullable: true
        provider:
          type: string
          description: 'Where the login is created: Default (when omitted) or Auth0.'
          example: Auth0
      additionalProperties: false
      description: The credential the invited person's login is created with.
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.