# Set integration identifiers

> Adds integration identifiers to a profile.

## OpenAPI

```yaml
/api-specs/adapty-api.yaml post /api/v2/server-side-api/integration/profile/set/integration-identifiers/
openapi: 3.1.0
info:
  title: Adapty server-side API
  version: 1.0.0
servers:
  - url: https://api.adapty.io
    description: Production server
paths:
  /api/v2/server-side-api/integration/profile/set/integration-identifiers/:
    post:
      summary: Set integration identifiers
      description: Adds integration identifiers to a profile.
      operationId: setIntegrationIdentifiers
      tags:
        - Integration
      security:
        - apikeyAuth: []
      parameters:
        - name: adapty-customer-user-id
          in: header
          required: false
          schema:
            type: string
          description: The unique ID of the customer in your system. Either `adapty-customer-user-id` or `adapty-profile-id` is required.
        - name: adapty-profile-id
          in: header
          required: false
          schema:
            type: string
            format: uuid
          description: The unique ID of the profile in your system. Your best option if you are working with anonymous profiles. Either `adapty-customer-user-id` or `adapty-profile-id` is required.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IntegrationIdentifiersRequest"
            example:
              pushwoosh_hwid: example_pushwoosh_hwid
              mixpanel_user_id: example_mixpanel_user_id
              facebook_anonymous_id: example_facebook_anonymous_id
              firebase_app_instance_id: example_firebase_app_instance_id
              amplitude_user_id: example_amplitude_user_id
              amplitude_device_id: example_amplitude_device_id
              appmetrica_device_id: example_appmetrica_device_id
              appmetrica_profile_id: example_appmetrica_profile_id
              one_signal_subscription_id: example_one_signal_subscription_id
              one_signal_player_id: example_one_signal_player_id
              branch_id: example_branch_id
              appsflyer_id: example_appsflyer_id
              adjust_device_id: example_adjust_device_id
              airbridge_device_id: example_airbridge_device_id
              tenjin_analytics_installation_id: example_tenjin_analytics_installation_id
              posthog_distinct_user_id: example_posthog_distinct_user_id
      responses:
        "200":
          description: Integration identifiers set successfully. The response body is blank.
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              example:
                errors:
                  - At least one integration identifier must be provided.
                error_code: validation_error
                status_code: 400
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              example:
                errors:
                  - Invalid API key
                error_code: unauthorized
                status_code: 401
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              example:
                errors:
                  - Profile not found
                error_code: profile_not_found
                status_code: 404
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
components:
  schemas:
    IntegrationIdentifiersRequest:
      type: object
      properties:
        adjust_device_id:
          type: string
          nullable: true
          description: The network user's ID in the Adjust integration
        airbridge_device_id:
          type: string
          nullable: true
          description: The ID of the user's device in Airbridge integration
        amplitude_device_id:
          type: string
          nullable: true
          description: The ID of the user's device in Amplitude integration
        amplitude_user_id:
          type: string
          nullable: true
          description: The ID of the user in Amplitude integration
        appmetrica_device_id:
          type: string
          nullable: true
          description: The ID of the user's device in AppMetrica integration
        appmetrica_profile_id:
          type: string
          nullable: true
          description: The ID of the user in AppMetrica integration
        appsflyer_id:
          type: string
          nullable: true
          description: The network user's ID in the AppsFlyer integration
        branch_id:
          type: string
          nullable: true
          description: The Branch Key of the user's app in the Branch integration
        facebook_anonymous_id:
          type: string
          nullable: true
          description: The ID of the user in Facebook Ads integration
        firebase_app_instance_id:
          type: string
          nullable: true
          description: The ID of the user in Firebase integration
        mixpanel_user_id:
          type: string
          nullable: true
          description: The ID of the user in Mixpanel integration
        one_signal_player_id:
          type: string
          nullable: true
          description: The ID of the user in OneSignal integration (Legacy identifier)
        one_signal_subscription_id:
          type: string
          nullable: true
          description: The ID of the user in OneSignal integration (Recommended identifier)
        posthog_distinct_user_id:
          type: string
          nullable: true
          description: The ID of the user in PostHog integration
        pushwoosh_hwid:
          type: string
          nullable: true
          description: The ID of the user's device in Pushwoosh integration
        tenjin_analytics_installation_id:
          type: string
          nullable: true
          description: The ID of the user's device in Tenjin integration
      description: At least one integration identifier must be provided
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
                nullable: true
                description: Source of the error
              errors:
                type: array
                items:
                  type: string
                description: Array of error messages
        error_code:
          type: string
          description: Short error name
        status_code:
          type: integer
          description: HTTP status code
      required:
        - errors
        - error_code
        - status_code
  securitySchemes:
    apikeyAuth:
      type: apiKey
      name: Authorization
      in: header
      default: Api-Key {Your secret API key}
      description: |
        API requests must be authenticated by your secret API key as the **Authorization** 
        header with the value `Api-Key {your_secret_api_key}`, for example, 
        `Api-Key secret_live_...`. Find this key in the Adapty Dashboard -> 
        **App Settings** -> **General** tab -> **API keys** section.
```
