Schematic accounts API

The accounts API from Schematic — 12 operation(s) for accounts.

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

OpenAPI Specification

schematic-accounts-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Schematic accesstokens accounts API
  version: '0.1'
  description: Schematic API
  x-rules-engine-schema-version: v97288f60
servers:
- url: https://api.schematichq.com
security:
- ApiKeyAuth: []
tags:
- name: accounts
paths:
  /account-members:
    get:
      operationId: listAccountMembers
      summary: List account members
      tags:
      - accounts
      parameters:
      - name: ids
        in: query
        schema:
          type: array
          items:
            type: string
          maxItems: 100
      - name: q
        in: query
        description: Search filter
        schema:
          type: string
          description: Search filter
          maxLength: 512
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccountMemberResponseData'
                    title: ListAccountMembersResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      ids:
                        type: array
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      q:
                        type: string
                        description: Search filter
                        maxLength: 512
                    title: ListAccountMembersParams
                required:
                - data
                - params
                title: ListAccountMembersResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /account-members/{account_member_id}:
    get:
      operationId: getAccountMember
      summary: Get account member
      tags:
      - accounts
      parameters:
      - name: account_member_id
        in: path
        description: account_member_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AccountMemberResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetAccountMemberParams
                required:
                - data
                - params
                title: GetAccountMemberResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /api-keys:
    get:
      operationId: listApiKeys
      summary: List api keys
      tags:
      - accounts
      parameters:
      - name: environment_id
        in: query
        schema:
          type: string
      - name: require_environment
        in: query
        required: true
        schema:
          type: boolean
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKeyResponseData'
                    title: ListApiKeysResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      environment_id:
                        type: string
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      require_environment:
                        type: boolean
                    title: ListApiKeysParams
                required:
                - data
                - params
                title: ListApiKeysResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: createApiKey
      summary: Create api key
      tags:
      - accounts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ApiKeyCreateResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CreateApiKeyParams
                required:
                - data
                - params
                title: CreateApiKeyResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /api-keys/{api_key_id}:
    get:
      operationId: getApiKey
      summary: Get api key
      tags:
      - accounts
      parameters:
      - name: api_key_id
        in: path
        description: api_key_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ApiKeyResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetApiKeyParams
                required:
                - data
                - params
                title: GetApiKeyResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    put:
      operationId: updateApiKey
      summary: Update api key
      tags:
      - accounts
      parameters:
      - name: api_key_id
        in: path
        description: api_key_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApiKeyRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ApiKeyResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpdateApiKeyParams
                required:
                - data
                - params
                title: UpdateApiKeyResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    delete:
      operationId: deleteApiKey
      summary: Delete api key
      tags:
      - accounts
      parameters:
      - name: api_key_id
        in: path
        description: api_key_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeleteResponse'
                  params:
                    type: object
                    description: Input parameters
                    title: DeleteApiKeyParams
                required:
                - data
                - params
                title: DeleteApiKeyResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /api-keys/count:
    get:
      operationId: countApiKeys
      summary: Count api keys
      tags:
      - accounts
      parameters:
      - name: environment_id
        in: query
        schema:
          type: string
      - name: require_environment
        in: query
        required: true
        schema:
          type: boolean
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CountResponse'
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      environment_id:
                        type: string
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      require_environment:
                        type: boolean
                    title: CountApiKeysParams
                required:
                - data
                - params
                title: CountApiKeysResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /audit-log:
    get:
      operationId: listAuditLogs
      summary: List audit logs
      tags:
      - accounts
      parameters:
      - name: actor_type
        in: query
        schema:
          $ref: '#/components/schemas/ActorType'
      - name: end_time
        in: query
        schema:
          type: string
          format: date-time
      - name: environment_id
        in: query
        schema:
          type: string
      - name: q
        in: query
        schema:
          type: string
          maxLength: 512
      - name: start_time
        in: query
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AuditLogListResponseData'
                    title: ListAuditLogsResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      actor_type:
                        $ref: '#/components/schemas/ActorType'
                      end_time:
                        type: string
                        format: date-time
                      environment_id:
                        type: string
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      q:
                        type: string
                        maxLength: 512
                      start_time:
                        type: string
                        format: date-time
                    title: ListAuditLogsParams
                required:
                - data
                - params
                title: ListAuditLogsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /audit-log/{audit_log_id}:
    get:
      operationId: getAuditLog
      summary: Get audit log
      tags:
      - accounts
      parameters:
      - name: audit_log_id
        in: path
        description: audit_log_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AuditLogResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetAuditLogParams
                required:
                - data
                - params
                title: GetAuditLogResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /audit-log/count:
    get:
      operationId: countAuditLogs
      summary: Count audit logs
      tags:
      - accounts
      parameters:
      - name: actor_type
        in: query
        schema:
          $ref: '#/components/schemas/ActorType'
      - name: end_time
        in: query
        schema:
          type: string
          format: date-time
      - name: environment_id
        in: query
        schema:
          type: string
      - name: q
        in: query
        schema:
          type: string
          maxLength: 512
      - name: start_time
        in: query
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CountResponse'
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      actor_type:
                        $ref: '#/components/schemas/ActorType'
                      end_time:
                        type: string
                        format: date-time
                      environment_id:
                        type: string
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      q:
                        type: string
                        maxLength: 512
                      start_time:
                        type: string
                        format: date-time
                    title: CountAuditLogsParams
                required:
                - data
                - params
                title: CountAuditLogsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /environments:
    get:
      operationId: listEnvironments
      summary: List environments
      tags:
      - accounts
      parameters:
      - name: ids
        in: query
        schema:
          type: array
          items:
            type: string
          maxItems: 100
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/EnvironmentResponseData'
                    title: ListEnvironmentsResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      ids:
                        type: array
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                    title: ListEnvironmentsParams
                required:
                - data
                - params
                title: ListEnvironmentsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: createEnvironment
      summary: Create environment
      tags:
      - accounts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnvironmentRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EnvironmentDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CreateEnvironmentParams
                required:
                - data
                - params
                title: CreateEnvironmentResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /environments/{environment_id}:
    get:
      operationId: getEnvironment
      summary: Get environment
      tags:
      - accounts
      parameters:
      - name: environment_id
        in: path
        description: environment_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EnvironmentResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetEnvironmentParams
                required:
                - data
                - params
                title: GetEnvironmentResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    put:
      operationId: updateEnvironment
      summary: Update environment
      tags:
      - accounts
      parameters:
      - name: environment_id
        in: path
        description: environment_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEnvironmentRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EnvironmentResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpdateEnvironmentParams
                required:
                - data
                - params
                title: UpdateEnvironmentResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    delete:
      operationId: deleteEnvironment
      summary: Delete environment
      tags:
      - accounts
      parameters:
      - name: environment_id
        in: path
        description: environment_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeleteResponse'
                  params:
                    type: object
                    description: Input parameters
                    title: DeleteEnvironmentParams
                required:
                - data
                - params
                title: DeleteEnvironmentResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /quickstart:
    post:
      operationId: quickstart
      summary: Quickstart
      tags:
      - accounts
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/QuickstartResp'
                  params:
                    type: object
                    description: Input parameters
                    title: QuickstartParams
                required:
                - data
                - params
                title: QuickstartResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /whoami:
    get:
      operationId: getWhoAmI
      summary: Get who am I
      tags:
      - accounts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WhoAmIResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetWhoAmIParams
                required:
                - data
                - params
                title: GetWhoAmIResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  responses:
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ServerError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ActorType:
      type: string
      enum:
      - api_key
      - app_user
      - stripe_app
      - system
      - temporary_access_token
    QuickstartResp:
      type: object
      properties:
        ok:
          type: boolean
      required:
      - ok
      title: QuickstartResp
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
      - error
    ApiKeyScope:
      type: string
      enum:
      - admin
      - capture
      - read
      - write
    AccountMemberResponseData:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        email:
          type: string
          nullable: true
        id:
          type: string
        image_url:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        permissions:
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/AccountMemberPermission'
            maxItems: 64
          type: object
        role:
          allOf:
          - $ref: '#/components/schemas/AccountMemberRole'
          nullable: true
        updated_at:
          type: string
          format: date-time
      required:
      - created_at
      - id
      - permissions
      - updated_at
      title: AccountMemberResponseData
    AuditLogResponseData:
      type: object
      properties:
        actor_type:
          $ref: '#/components/schemas/ActorType'
        api_key_id:
          type: string
          nullable: true
        ended_at:
          type: string
          format: date-time
          nullable: true
        environment:
          $ref: '#/components/schemas/EnvironmentResponseData'
        environment_id:
          type: string
          nullable: true
        id:
          type: string
          maxLength: 36
          minLength: 36
        method:
          type: string
          maxLength: 10
          minLength: 1
        req_body:
          type: string
          nullable: true
        resource_id:
          type: integer
          format: int64
          nullable: true
        resource_i

# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/schematic/refs/heads/main/openapi/schematic-accounts-api-openapi.yml