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

# Assign a Google Business Profile location to a brand

> Assigns one location from this login to the given brand, without re-doing OAuth. Each location belongs to exactly one brand, and each brand holds at most one Google Business Profile.



## OpenAPI

````yaml /api-reference/openapi.json post /platforms/google/logins/{loginId}/locations/{locationId}/assign
openapi: 3.0.0
info:
  description: >-
    Unified social media inbox API. Read and respond to comments, DMs, reviews,
    and mentions across Instagram, Facebook, Threads, Google Business Profile,
    TikTok, LinkedIn, and YouTube through a single REST API. X/Twitter and
    Trustpilot coming soon.
  title: SocialAPI.AI
  contact:
    name: SocialAPI.AI Support
    email: support@social-api.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.social-api.ai/v1
security: []
paths:
  /platforms/google/logins/{loginId}/locations/{locationId}/assign:
    post:
      tags:
        - Platforms
      summary: Assign a Google Business Profile location to a brand
      description: >-
        Assigns one location from this login to the given brand, without
        re-doing OAuth. Each location belongs to exactly one brand, and each
        brand holds at most one Google Business Profile.
      parameters:
        - description: Google login (credential) ID
          name: loginId
          in: path
          required: true
          schema:
            type: string
        - description: >-
            Location resource name (URL-encoded), e.g.
            accounts%2F123%2Flocations%2F456
          name: locationId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api_endpoints.AssignLocationRequest'
        description: Target brand
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.AssignLocationResponse'
        '400':
          description: >-
            Location is not accessible through this login, or already belongs to
            another brand
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '404':
          description: Unknown login or brand
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '409':
          description: Brand already has a Google Business Profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api_endpoints.AssignLocationRequest:
      type: object
      properties:
        brand_id:
          type: string
          example: b7f9...
    api_endpoints.AssignLocationResponse:
      type: object
      properties:
        account_id:
          type: string
          example: acc_01J...
        brand_id:
          type: string
        platform_account_id:
          type: string
    api_endpoints.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/api_endpoints.ErrorBody'
    api_endpoints.ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: resource.not_found
        message:
          type: string
          example: Account not found
        meta:
          type: object
          additionalProperties: {}
  securitySchemes:
    BearerAuth:
      description: >-
        Prefix your API key with "Bearer ". Example: `Authorization: Bearer
        sapi_key_...`
      type: apiKey
      name: Authorization
      in: header

````