Gojiberry AI Organization API

The Organization API from Gojiberry AI — 2 operation(s) for organization.

OpenAPI Specification

gojiberry-ai-organization-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Gojiberry AI - External AppExternal Organization API
  description: "\n# Gojiberry AI External API\n\nThis API allows you to programmatically access your Gojiberry AI data and integrate it with your applications.\n\n## Authentication\n\nAll API requests require authentication using a Bearer token. To get your API key:\n\n1. **Log in to your Gojiberry AI account** at [https://app.gojiberry.ai](https://app.gojiberry.ai)\n2. **Navigate to Settings** → **API** section\n3. **Click \"Create API Key\"** to generate a new token\n4. **Copy the API key** when it's displayed (you won't be able to see it again)\n5. **Use the token** in your requests by adding the header: `Authorization: Bearer YOUR_API_KEY`\n\n## Impersonation (organization owners)\n\nIf your API key belongs to the **owner of an organization**, you can perform any API call on behalf of another member of your organization by adding the `x-impersonate-user-id` header with the member's user ID:\n\n```bash\n# Get the contacts of the organization member with user ID 123\ncurl -H \"Authorization: Bearer YOUR_API_KEY\" \\\n     -H \"x-impersonate-user-id: 123\" \\\n     https://ext.gojiberry.ai/v1/contact\n```\n\nWhen impersonating, the request behaves exactly as if it was made by that member: you read and write their data (contacts, campaigns, lists, unibox, etc.).\n\nRules:\n- Your API key must belong to the **organization owner**; other members cannot impersonate.\n- The impersonated user must belong to the **same organization** as the API key user.\n- Requests that don't meet these rules are rejected with a `401 Unauthorized`.\n\nTip: use `GET /v1/organization/members` to list the members of your organization and their user IDs, and `GET /v1/user/me` to verify which user the current request acts as.\n\n## Rate Limits\n\n- **100 requests per minute** per API key\n\n## Base URL\n- **Production**: `https://ext.gojiberry.ai`\n\n## Endpoints\n\n### Contacts\n- `GET /v1/contact` - Get all contacts with filtering and pagination\n- `GET /v1/contact/{id}` - Get a specific contact\n- `GET /v1/contact/health` - Health check endpoint\n\n## Example Usage\n\n```bash\n# Get all contacts\ncurl -H \"Authorization: Bearer YOUR_API_KEY\" \\\n     https://ext.gojiberry.ai/v1/contact\n\n# Get contacts with filtering\ncurl -H \"Authorization: Bearer YOUR_API_KEY\" \\\n     \"https://ext.gojiberry.ai/v1/contact?search=john&agent=1&dateFrom=2024-01-01\"\n\n# Get a specific contact\ncurl -H \"Authorization: Bearer YOUR_API_KEY\" \\\n     https://ext.gojiberry.ai/v1/contact/123\n```\n\n## Webhooks\n\nGojiberry allows you to receive real-time notifications when new contacts are created or updated by configuring a webhook URL.\n\n### How to Configure Webhooks\n\n1. **Log in to your Gojiberry AI account** at [https://app.gojiberry.ai](https://app.gojiberry.ai)\n2. **Navigate to the Integrations page** at [https://app.gojiberry.ai/integrations](https://app.gojiberry.ai/integrations)\n3. **Add a Webhook integration** by clicking the Webhook option\n4. **Enter your webhook URL** where you want to receive notifications\n5. **Save the configuration**\n\nOnce configured, Gojiberry will send POST requests to your webhook URL whenever:\n- A new contact is created\n- A contact is updated\n- Other relevant events occur in your account\n\nThe webhook payload will include the full contact data in JSON format. Each webhook request includes a custom header `x-gojiberry-user-id` containing your user ID for verification purposes.\n\n## Support\n\nFor API support, please contact us at [hello@gojiberry.ai](mailto:hello@gojiberry.ai)\n      "
  version: '1.0'
  contact: {}
servers: []
tags:
- name: Organization
paths:
  /v1/organization:
    get:
      description: Retrieve the organization of the authenticated user.
      operationId: OrganizationExternalController_getOrganization
      parameters:
      - name: x-impersonate-user-id
        in: header
        description: ID of an organization member to act on behalf of. The API key user must be the owner of the organization and the target user must belong to the same organization.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Organization information
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: number
                    description: Organization ID
                  companyName:
                    type: string
                    nullable: true
                    description: Company name
                  website:
                    type: string
                    nullable: true
                    description: Company website URL
                  industry:
                    type: string
                    nullable: true
                    description: Industry
                  companySize:
                    type: string
                    nullable: true
                    description: Company size
                  description:
                    type: string
                    nullable: true
                    description: Company description
                  linkedinPage:
                    type: string
                    nullable: true
                    description: LinkedIn company page URL
                  ownerId:
                    type: number
                    nullable: true
                    description: User ID of the organization owner
                  createdAt:
                    type: string
                    format: date-time
                    description: Creation date
        '404':
          description: Organization not found
      security:
      - bearer: []
      summary: Get the organization
      tags:
      - Organization
  /v1/organization/members:
    get:
      description: Retrieve all members of the organization of the authenticated user. The member IDs can be used in the x-impersonate-user-id header to act on behalf of a member.
      operationId: OrganizationExternalController_getOrganizationMembers
      parameters:
      - name: x-impersonate-user-id
        in: header
        description: ID of an organization member to act on behalf of. The API key user must be the owner of the organization and the target user must belong to the same organization.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List of organization members
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                      description: User ID of the member (usable in the x-impersonate-user-id header)
                    email:
                      type: string
                      description: Email address of the member
                    firstName:
                      type: string
                      nullable: true
                      description: First name of the member
                    lastName:
                      type: string
                      nullable: true
                      description: Last name of the member
                    organizationRole:
                      type: string
                      enum:
                      - member
                      - admin
                      description: Role of the member in the organization
                    isActive:
                      type: boolean
                      description: Whether the member account is active
                    createdAt:
                      type: string
                      format: date-time
                      description: Account creation date
        '404':
          description: Organization not found
      security:
      - bearer: []
      summary: Get all organization members
      tags:
      - Organization
components:
  securitySchemes:
    API-Key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      name: JWT
      description: Enter API Key
      in: header