openapi: 3.0.3 info: title: Docupilot accounts APIs ai auth_tokens API version: '1.0' description: Docupilot accounts APIs termsOfService: https://docupilot.app/terms-and-conditions/ contact: name: Team Docupilot email: support@docupilot.app tags: - name: auth_tokens paths: /dashboard/accounts/v2/auth_tokens/: get: operationId: list_auth_tokens parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: search required: false in: query description: A search term. schema: type: string tags: - auth_tokens security: - SessionAuthentication: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/AuthToken' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' post: operationId: create_auth_token parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true tags: - auth_tokens requestBody: content: application/json: schema: $ref: '#/components/schemas/AuthToken' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/AuthToken' multipart/form-data: schema: $ref: '#/components/schemas/AuthToken' required: true security: - SessionAuthentication: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/NewAuthTokenResponse' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' /dashboard/accounts/v2/auth_tokens/{id}/: put: operationId: update_auth_token parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: id schema: type: integer description: A unique integer value identifying this auth token. required: true tags: - auth_tokens requestBody: content: application/json: schema: $ref: '#/components/schemas/AuthToken' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/AuthToken' multipart/form-data: schema: $ref: '#/components/schemas/AuthToken' required: true security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/AuthToken' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' delete: operationId: delete_auth_token parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: id schema: type: integer description: A unique integer value identifying this auth token. required: true tags: - auth_tokens security: - SessionAuthentication: [] responses: '204': description: No response body '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' components: schemas: UnauthenticatedError: type: object properties: detail: type: string required: - detail description: '' NewAuthTokenResponse: type: object properties: id: type: integer readOnly: true token: type: string readOnly: true name: type: string maxLength: 255 created_time: type: string format: date-time readOnly: true nullable: true last_used_time: type: string format: date-time nullable: true active: type: boolean secret: type: string readOnly: true nullable: true required: - created_time - id - name - secret - token description: '' ValidationError: type: object properties: errors: type: object additionalProperties: type: array items: type: string non_field_errors: type: array items: type: string required: - errors - non_field_errors description: '' AuthToken: type: object properties: id: type: integer readOnly: true token: type: string readOnly: true name: type: string maxLength: 255 created_time: type: string format: date-time readOnly: true nullable: true last_used_time: type: string format: date-time readOnly: true nullable: true active: type: boolean default: true required: - created_time - id - last_used_time - name - token description: '' ForbiddenError: type: object properties: detail: type: string required: - detail description: '' NotFoundError: type: object properties: detail: type: string required: - detail description: '' securitySchemes: OAuthAuthentication: type: http scheme: bearer description: OAuth2 Bearer Token Authentication SessionAuthentication: type: apiKey in: cookie name: sessionid description: browser based login takes care of this externalDocs: description: Help docs on how to use API url: https://help.docupilot.app/developers/api-overview