Tines Credentials API

Manage stored credentials for integrations

OpenAPI Specification

tines-credentials-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Tines REST Actions Credentials API
  description: The Tines REST API provides programmatic access to all platform resources including stories (workflows), actions, credentials, teams, folders, cases, records, dashboards, audit logs, SCIM provisioning, AI usage tracking, reporting, tags, and the workbench. The API uses API key authentication via X-User-Token header or Bearer token and is accessed via each tenant's custom subdomain.
  version: 1.0.0
  contact:
    name: Tines API Documentation
    url: https://www.tines.com/api/welcome/
  x-api-id: tines-rest-api
  x-provider-name: tines
servers:
- url: https://{tenantDomain}/api/v1
  description: Tines tenant API v1
  variables:
    tenantDomain:
      default: your-tenant.tines.com
      description: Your Tines tenant domain (e.g. adjective-noun-1234.tines.com)
- url: https://{tenantDomain}/api/v2
  description: Tines tenant API v2 (Cases)
  variables:
    tenantDomain:
      default: your-tenant.tines.com
      description: Your Tines tenant domain
security:
- BearerAuth: []
- ApiKeyAuth: []
tags:
- name: Credentials
  description: Manage stored credentials for integrations
paths:
  /user_credentials:
    get:
      operationId: listCredentials
      summary: List credentials
      description: Returns a paginated list of credentials accessible by the API key.
      tags:
      - Credentials
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - name: team_id
        in: query
        description: Filter credentials by team ID
        schema:
          type: integer
      responses:
        '200':
          description: Paginated list of credentials
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PaginatedMeta'
                - type: object
                  properties:
                    user_credentials:
                      type: array
                      items:
                        $ref: '#/components/schemas/Credential'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    post:
      operationId: createCredential
      summary: Create a credential
      description: Creates a new credential for use in stories and actions.
      tags:
      - Credentials
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CredentialCreate'
            example:
              name: aws credential
              mode: AWS
              team_id: 2
              aws_authentication_type: ROLE
              aws_access_key: v_access_key
              aws_secret_key: v_secret_key
              aws_assumed_role_arn: v_role_arn
      responses:
        '200':
          description: Credential created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /user_credentials/{id}:
    get:
      operationId: getCredential
      summary: Get a credential
      description: Returns details for a specific credential by ID.
      tags:
      - Credentials
      parameters:
      - $ref: '#/components/parameters/ResourceId'
      responses:
        '200':
          description: Credential details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    put:
      operationId: updateCredential
      summary: Update a credential
      description: Updates an existing credential by ID.
      tags:
      - Credentials
      parameters:
      - $ref: '#/components/parameters/ResourceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CredentialCreate'
      responses:
        '200':
          description: Credential updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    delete:
      operationId: deleteCredential
      summary: Delete a credential
      description: Deletes a credential by ID.
      tags:
      - Credentials
      parameters:
      - $ref: '#/components/parameters/ResourceId'
      responses:
        '200':
          description: Credential deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
components:
  schemas:
    CredentialCreate:
      type: object
      required:
      - name
      - mode
      - team_id
      properties:
        name:
          type: string
          description: Credential name
        mode:
          type: string
          enum:
          - AWS
          - TEXT
          - HTTP_REQUEST_AGENT
          - JWT
          - OAUTH2
          - MTLS
          description: Credential type
        team_id:
          type: integer
          description: Team ID where credential resides
        aws_authentication_type:
          type: string
          enum:
          - KEY
          - ROLE
          - INSTANCE_PROFILE
          description: AWS authentication type (required when mode is AWS)
        aws_access_key:
          type: string
          description: AWS access key ID
        aws_secret_key:
          type: string
          description: AWS secret access key
        aws_assumed_role_arn:
          type: string
          description: Required if aws_authentication_type is ROLE
        use_static_external_id:
          type: boolean
          description: Enable team-scoped static external ID
        folder_id:
          type: integer
          description: Folder location ID
        read_access:
          type: string
          enum:
          - TEAM
          - GLOBAL
          - SPECIFIC_TEAMS
          default: TEAM
        shared_team_slugs:
          type: array
          items:
            type: string
        description:
          type: string
        metadata:
          type: object
        allowed_hosts:
          type: array
          items:
            type: string
        expires_at:
          type: string
          format: date-time
        expiry_notifications_enabled:
          type: boolean
          default: false
        credential_notification_recipient_user_ids:
          type: array
          items:
            type: integer
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message describing the issue
    Credential:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        mode:
          type: string
          enum:
          - AWS
          - TEXT
          - HTTP_REQUEST_AGENT
          - JWT
          - OAUTH2
          - MTLS
        team_id:
          type: integer
        folder_id:
          type: integer
          nullable: true
        read_access:
          type: string
          enum:
          - TEAM
          - GLOBAL
          - SPECIFIC_TEAMS
        shared_team_slugs:
          type: array
          items:
            type: string
        slug:
          type: string
        description:
          type: string
        allowed_hosts:
          type: array
          items:
            type: string
        metadata:
          type: object
        owner:
          type: object
          properties:
            user_id:
              type: integer
            first_name:
              type: string
            last_name:
              type: string
            email:
              type: string
        expires_at:
          type: string
          format: date-time
          nullable: true
        expiry_notifications_enabled:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaginatedMeta:
      type: object
      properties:
        meta:
          type: object
          properties:
            current_page:
              type: integer
            previous_page:
              type: integer
              nullable: true
            next_page:
              type: integer
              nullable: true
            next_page_number:
              type: integer
              nullable: true
            per_page:
              type: integer
            pages:
              type: integer
            count:
              type: integer
  responses:
    Unauthorized:
      description: Authentication credentials missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: Validation error — one or more request parameters are invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      description: The unique numeric identifier of the resource
      schema:
        type: integer
    PerPage:
      name: per_page
      in: query
      description: Number of results per page (default 20, max 500)
      schema:
        type: integer
        default: 20
        maximum: 500
    Page:
      name: page
      in: query
      description: Page number for pagination (default 1)
      schema:
        type: integer
        default: 1
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer token authentication using an Tines API key. Format: `Authorization: Bearer <api_key>`'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-User-Token
      description: 'API key authentication using the X-User-Token header. Format: `X-User-Token: <api_key>`'