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

# Create or Update Agency

> Create an agency if missing, otherwise merge provided fields

<Note>
  `name` is required when creating. Fields like `userId`, `ID`, `ts`, and `secret` cannot be overwritten via the body.
</Note>

## Example Request

```json theme={null}
{
  "agency": {
    "name": "Acme Agency",
    "brandingText": "Powered by Acme",
    "supportEmail": "support@acme.example",
    "mainWebsite": "https://acme.example"
  }
}
```


## OpenAPI

````yaml POST /agency
openapi: 3.0.3
info:
  title: Convocore OpenAPI
  description: Full API reference for Convocore
  version: 1.0.4
servers:
  - url: https://eu-gcp-api.vg-stuff.com/v3
security: []
paths:
  /agency:
    post:
      tags:
        - Agency
      summary: Create or Update Agency
      description: >-
        Creates an agency for the workspace if missing, otherwise merges the
        provided fields
      operationId: upsertAgency
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agency:
                  type: object
                  properties:
                    agencyId:
                      type: string
                    name:
                      type: string
                    squarePhotoURL:
                      type: string
                    darkModeSquarePhotourl:
                      type: string
                    faviconURL:
                      type: string
                    brandingText:
                      type: string
                    customDomain:
                      type: string
                    VGsubDomain:
                      type: string
                    lastModified:
                      type: number
                    withVGBranding:
                      type: boolean
                    themeVariant:
                      type: string
                      enum:
                        - default
                        - bordered
                        - flat
                        - faded
                    themeColorUsage:
                      type: string
                      enum:
                        - gradient
                        - colorful
                        - plain
                    googleFont:
                      type: string
                    mainWebsite:
                      type: string
                    supportEmail:
                      type: string
                    tosPage:
                      type: string
                    privacyPolicypPage:
                      type: string
                    confirmedRegion:
                      type: string
                    customThemeJSONString:
                      type: string
                    isVerifiedSubDomain:
                      type: boolean
                    isVerifiedCustomDomain:
                      type: boolean
                    secondaryColorHex:
                      type: string
                    settings:
                      $ref: >-
                        #/components/schemas/disablePasswordLogin_enableClientSignup_clientOnboarding_14580b
                  additionalProperties: true
              required:
                - agency
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      ID:
                        type: string
                      userId:
                        type: string
                      agencyId:
                        type: string
                      name:
                        type: string
                      squarePhotoURL:
                        type: string
                      darkModeSquarePhotourl:
                        type: string
                      faviconURL:
                        type: string
                      brandingText:
                        type: string
                      customDomain:
                        type: string
                      VGsubDomain:
                        type: string
                      ts:
                        type: number
                      lastModified:
                        type: number
                      withVGBranding:
                        type: boolean
                      themeVariant:
                        type: string
                        enum:
                          - default
                          - bordered
                          - flat
                          - faded
                      themeColorUsage:
                        type: string
                        enum:
                          - gradient
                          - colorful
                          - plain
                      googleFont:
                        type: string
                      mainWebsite:
                        type: string
                      supportEmail:
                        type: string
                      tosPage:
                        type: string
                      privacyPolicypPage:
                        type: string
                      confirmedRegion:
                        type: string
                      customThemeJSONString:
                        type: string
                      isVerifiedSubDomain:
                        type: boolean
                      isVerifiedCustomDomain:
                        type: boolean
                      secondaryColorHex:
                        type: string
                      settings:
                        $ref: >-
                          #/components/schemas/disablePasswordLogin_enableClientSignup_clientOnboarding_14580b
                    additionalProperties: true
                required:
                  - success
                  - message
                  - data
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  schemas:
    disablePasswordLogin_enableClientSignup_clientOnboarding_14580b:
      type: object
      properties:
        disablePasswordLogin:
          type: boolean
        enableClientSignup:
          type: boolean
        clientOnboarding:
          type: object
          additionalProperties: {}
      additionalProperties: true
    message_11569e:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      additionalProperties: false
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  $ref: '#/components/schemas/message_11569e'
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````