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

# Connect an Identity’s Integration

> Connect an Identity to a platform like LinkedIn by authenticating an user with cookies or credentials.

Connect an identity to an integration. An identity can only be connected to one integration per platform (one LinkedIn account for example).
The data of an existing integration will be updated each time you call this endpoint if it has been connected before.

<Info>
  Before connecting an Integration, you must first [Create an
  Identity](/v1/api/identities/create) to associate the integration with.
</Info>

<Info>
  The response's object with meta fields is also returned on your integration webhook present on your [developpers settings](https://app.edges.run/settings/developers)
</Info>

<Tip>
  If you're looking to connect natively to LinkedIn using email and password,
  check out this specific endpoint: [Connect a LinkedIn Account
  (Username/Password)](/v1/api/linkedin/authentication)
</Tip>


## OpenAPI

````yaml v1/api/business.json post /identities/{identity_uid}/integrations/{integration}
openapi: 3.1.0
info:
  title: ED's Public API
  description: ED's Public API
  version: 26.622.88
servers:
  - url: https://api.edges.run/v1/
security:
  - APIKeyHeader: []
paths:
  /identities/{identity_uid}/integrations/{integration}:
    post:
      tags:
        - Core
      summary: >-
        Connect a identity to a platform like LinkedIn by authenticating them
        with cookies or credentials.
      description: Connect a Identity's Integration
      operationId: create_identities_integration
      parameters:
        - name: identity_uid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Identity Uid
        - name: integration
          in: path
          required: true
          schema:
            type: string
            title: Integration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountPublicRequest'
            example:
              auth_data:
                cookies:
                  li_at: example_li_at_token
                  li_a: example_li_a_token
              account_name: Example Account 1
      responses:
        '200':
          description: Successfully created a new account.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GenericResponse_AccountPublicWithCheckpointModel_
              example:
                setup_source: API
                auth_method: BASIC
                is_shared: false
                name: John Doe's Example Integration Account
                uid: 123e4567-e89b-12d3-a456-426614174000
                integration_permalink: example-integration
                created_at: '2023-10-01T12:00:00Z'
                level: Classic
                identity_uid: 5678e456-e89b-12d3-a456-426614174001
                meta:
                  key: value
                status: VALID
                last_synced_at: '2026-05-19T13:25:28.417259'
        '400':
          description: Bad Request.
          content:
            application/json:
              examples:
                invalid-username-password_400:
                  summary: Username or password invalid.
                  value:
                    message: Username or password invalid.
                    error_label: INVALID_CREDENTIALS_400
                in-app-challenge-pending-400:
                  summary: Can't validate the login challenge.
                  value:
                    message: >-
                      Error while resolving the challenge, can't validate the
                      login challenge.
                    error_label: CREATE_OR_UPDATE_ACCOUNT_409_CONFLICT
                invalid-credentials-400:
                  summary: Error while logging into LinkedIn.
                  value:
                    message: Error while logging into LinkedIn.
                    error_label: INVALID_CREDENTIALS
                need-password-reset-400:
                  summary: Password reset requested.
                  value:
                    message: >-
                      The account is locked, you need to request a password
                      reset
                    error_label: REQUEST_PASSWORD_RESET
                invalid-cookies-400:
                  summary: Cookies invalid.
                  value:
                    message: >-
                      Update your LinkedIn integration (your cookie is not
                      valid).
                    error_label: LK_BAD_COOKIE
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                create_one_account_403_forbidden:
                  summary: >-
                    The requested identity does not belong to the current
                    workspace.
                  value:
                    message: >-
                      The requested identity does not belong to the current
                      workspace.
                    error_label: CREATE_ONE_ACCOUNT_403_FORBIDDEN
        '409':
          description: Conflict.
          content:
            application/json:
              examples:
                identity_management_disabled:
                  summary: Identity Already Has an Account
                  value:
                    message: >-
                      An account is already linked to this identity and
                      integration.
                    error_label: CREATE_OR_UPDATE_ACCOUNT_409_CONFLICT
                account-mismatch-409-conflict:
                  summary: Your account does not match the one previously synchronized.
                  value:
                    message: >-
                      Please note that your account is different from the one
                      that has already been synchronized.
                    error_label: CREATE_OR_UPDATE_ACCOUNT_409_CONFLICT
                linkedin-id-conflict-409:
                  summary: LinkedIn ID conflict.
                  value:
                    message: An account with the same Linkedin ID already exists.
                    error_label: CREATE_OR_UPDATE_ACCOUNT_409_CONFLICT
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: internal Error.
          content:
            application/json:
              examples:
                login-account-500-error:
                  summary: Could not login the account.
                  value:
                    message: Could not login the account.
                    error_label: LOGIN_ACCOUNT_ERROR
                unsupported-challenge-500:
                  summary: Unsupported challenge while logging into LinkedIn.
                  value:
                    message: >-
                      Unsupported challenge identified, please contact the
                      support and provide it with the identity_uid so we can
                      address it.
                    error_label: UNSUPPORTED_CHALLENGE
                login-simple-challenge-500:
                  summary: Can't resolve LinkedIn login challenge.
                  value:
                    message: >-
                      Error while login to Linkedin, can't resolve the
                      challenge.
                    error_label: LOGIN_SIMPLE_CHALLENGE
                captcha-challenge-error-500:
                  summary: Captcha Challenge too many attempts.
                  value:
                    message: >-
                      Error while resolving the challenge, the Captcha challenge
                      seem to be pending.
                    error_label: CAPTCHA_CHALLENGE_ERROR
                in-app-challenge-unknown-500:
                  summary: Challenge expired or already validated.
                  value:
                    message: >-
                      Error while resolving the challenge, the challenge has
                      expired or has been already validated.
                    error_label: IN_APP_CHALLENGE_UNKNOWN
                2fa-validation-500:
                  summary: 2FA challenge expired or already validated.
                  value:
                    message: >-
                      Error while resolving the challenge, Challenge cannot be
                      validated, it may already valided or expired.
                    error_label: 2FA_VALIDATION
                checkpoint-missing-data-500:
                  summary: Error while resolving the checkpoint challenge.
                  value:
                    message: Error while resolving the challenge.
                    error_label: CHECKPOINT_MISSING_DATA
components:
  schemas:
    CreateAccountPublicRequest:
      properties:
        auth_data:
          $ref: '#/components/schemas/AuthData'
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
          description: >-
            Optional name for the integration account. If not provided, a
            default name will be generated.
      type: object
      required:
        - auth_data
      title: CreateAccountPublicRequest
    GenericResponse_AccountPublicWithCheckpointModel_:
      allOf:
        - $ref: '#/components/schemas/AccountPublicWithCheckpointModel'
      title: GenericResponse[AccountPublicWithCheckpointModel]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AuthData:
      properties:
        cookies:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: 'null'
              type: object
            - type: 'null'
          title: Cookies
        basic:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Basic
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
      type: object
      title: AuthData
    AccountPublicWithCheckpointModel:
      properties:
        setup_source:
          anyOf:
            - type: string
              enum:
                - MANUAL
                - EXTENSION
                - SHARED
                - API
            - type: 'null'
          title: Setup Source
        auth_method:
          anyOf:
            - type: string
              enum:
                - BASIC
                - OAUTH
                - COOKIES
                - APIKEY
            - type: 'null'
          title: Auth Method
        is_shared:
          type: boolean
          title: Is Shared
          default: false
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        uid:
          type: string
          format: uuid
          title: Uid
        integration_permalink:
          anyOf:
            - type: string
            - type: 'null'
          title: Integration Permalink
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        status:
          type: string
          enum:
            - VALID
            - INVALID
            - PENDING
            - LIMIT_REACHED
          title: Status
        level:
          anyOf:
            - type: string
            - type: 'null'
          title: Level
        user_uid:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Uid
        identity_uid:
          type: string
          format: uuid
          title: Identity Uid
        meta:
          anyOf:
            - $ref: '#/components/schemas/IntegrationAccountMeta'
            - type: 'null'
          title: Meta
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        checkpoint:
          anyOf:
            - $ref: '#/components/schemas/Checkpoint'
            - type: 'null'
        last_synced_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Synced At
      type: object
      required:
        - status
        - identity_uid
      title: AccountPublicWithCheckpointModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    IntegrationAccountMeta:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        id:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Id
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        profile_image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Image Url
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        emails:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Emails
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        phones:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Phones
      type: object
      title: IntegrationAccountMeta
    Checkpoint:
      properties:
        type:
          anyOf:
            - type: string
              enum:
                - 2FA
                - OTP
                - EMAIL
                - IN_APP_VALIDATION
                - PHONE_REGISTER
                - CAPTCHA
                - LOGIN_FORM
                - UNKNOWN
            - type: 'null'
          title: Type
      type: object
      title: Checkpoint
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key required for authentication. Add your API key in the X-API-Key
        header.

````