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

# Add or Update an Integration Account



## OpenAPI

````yaml post /v3/integrations/{integration_uid}/accounts
openapi: 3.0.2
info:
  title: Captain Data's Public API
  description: Captain Data's API v3
  version: 3.0.0
servers: []
security:
  - APIKeyHeader: []
    ProjectIdHeader: []
tags:
  - name: Workspace
    description: Endpoints related to workspace management
  - name: Users
    description: Endpoints related to users management
  - name: Integrations
    description: Endpoints related to integration accounts management
  - name: Workflows
    description: Endpoints related to running Workflows
  - name: Runs
    description: Endpoints related to fetching Run's Results & details
  - name: Inputs
    description: Endpoints related to fetching Run's Inputs
  - name: Webhooks
    description: Endpoints related to Webhooks management
paths:
  /v3/integrations/{integration_uid}/accounts:
    post:
      tags:
        - Integrations
      summary: Add or Update an Integration Account
      operationId: v3_add_update_account
      parameters:
        - required: true
          schema:
            title: Integration UID
            type: string
          name: integration_uid
          description: >-
            The slug of the integration, such as 'linkedin', used to create a
            new account of this type.
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateIntegrationAccountBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                message: Integration configured.
                account:
                  api_key: null
                  cookies:
                    li_at: YOUR_SESSION_COOKIE
                  integration_permalink: linkedin
                  is_shared: false
                  name: New account
                  password: null
                  setup_at: Fri, 02 Oct 2020 13:34:38 GMT
                  uid: xxxxxx-d339-4206-a4fb-a1fc8cc55eb7
                  user_id: null
                  username: null
                  via_extension: false
                  level: null
        '400':
          description: Wrong Account UID
          content:
            application/json:
              schema: {}
              example:
                error: The account uid you provided is not UUID.
        '404':
          description: Not Found Error
          content:
            application/json:
              schema: {}
              example:
                error: Could not find application.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - loc:
                      - body
                    msg: field required
                    type: value_error.missing
      security:
        - APIKeyHeader: []
          ProjectIdHeader: []
components:
  schemas:
    UpdateIntegrationAccountBody:
      title: UpdateIntegrationAccountBody
      type: object
      properties:
        account:
          title: Account
          description: The account JSON object to create or update.
          type: object
          example:
            uid: Pass this UID to update an account only
            name: Your account
            cookies:
              li_at: YOUR_SESSION_COOKIE
            user_uid: 67890-wxyz
        resume_paused_jobs:
          title: Resume Paused Jobs
          description: >-
            Set this to true to resume all paused jobs if you update, for
            example, an account's cookie.
          type: boolean
          example: false
          default: false
        shared_account:
          title: Shared Account
          description: Set this to true to share this account to an external user.
          type: boolean
          example: false
          default: false
        retrieve_ip:
          title: Retrieve Ip
          description: >-
            Set this to true to retrieve the IP we attribute to the
            user/account.
          type: boolean
          example: false
          default: false
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items: 61c7f447-c888-4823-b42f-2a23e4e31a10
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        The Authorization header must include 'x-api-key' followed by your API
        key (e.g., 'Authorization: x-api-key YOUR_API_KEY').
    ProjectIdHeader:
      type: apiKey
      in: header
      name: x-project-id
      description: Workspace UID required to identify the workspace.

````