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

# Apply to a campaign

> Applies to an open campaign with a message, as the campaign page in the app does. The creator has to match the campaign's categories and audience reach, or gets `NOT_ELIGIBLE`. A campaign that has closed answers `CAMPAIGN_CLOSED`. Naturally idempotent, so applying again returns the existing application with a 200.



## OpenAPI

````yaml /openapi/creator.yaml post /discover/campaigns/{campaignId}/apply
openapi: 3.1.0
info:
  title: Passionfroot Creator API
  version: 1.0.0-alpha
  description: >
    Access a creator's own partners, collaborations, placements, catalog,
    proposals, and conversations, and the open campaigns in Discover.

    The API is in alpha. Every operation is restricted to the creator account
    that owns the API key.
servers:
  - url: https://workspace.passionfroot.me/api/creators/v1
security:
  - bearerAuth: []
tags:
  - name: Placements
  - name: Partners
  - name: Collaborations
  - name: Conversations
  - name: Catalog
  - name: Requests
  - name: Proposals
  - name: Discover
paths:
  /discover/campaigns/{campaignId}/apply:
    post:
      tags:
        - Discover
      summary: Apply to a campaign
      description: >-
        Applies to an open campaign with a message, as the campaign page in the
        app does. The creator has to match the campaign's categories and
        audience reach, or gets `NOT_ELIGIBLE`. A campaign that has closed
        answers `CAMPAIGN_CLOSED`. Naturally idempotent, so applying again
        returns the existing application with a 200.
      operationId: applyToCreatorDiscoverCampaign
      parameters:
        - $ref: '#/components/parameters/CampaignId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - message
              properties:
                message:
                  type: string
                  maxLength: 10000
                  description: >-
                    Why you're a good fit, as plain text or simple HTML. A
                    message with an email address in it is refused, since brands
                    reply in Passionfroot.
            example:
              message: >-
                My audience is 20k indie developers, and my last sponsored video
                for a dev tool got 4% clicks.
      responses:
        '200':
          $ref: '#/components/responses/CampaignApplication'
        '201':
          $ref: '#/components/responses/CampaignApplication'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    CampaignId:
      name: campaignId
      in: path
      required: true
      schema:
        type: string
  responses:
    CampaignApplication:
      description: The creator's application to the campaign.
      content:
        application/json:
          schema:
            type: object
            required:
              - data
            properties:
              data:
                $ref: '#/components/schemas/CampaignApplication'
    BadRequest:
      description: Invalid parameters or body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Missing, invalid, expired, or revoked API key, or a creator account that
        is not approved.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The key lacks the required scope, the creator has no payouts set up for
        Discover (`DISCOVER_UNAVAILABLE`), or the creator doesn't match the
        campaign they apply to (`NOT_ELIGIBLE`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found or not owned by this creator.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The operation conflicts with current state or an identical write is in
        progress.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: RATE_LIMITED
              message: >-
                This API key is over its rate limit. Wait for Retry-After before
                sending more.
              details:
                limit: 2
                windowSeconds: 1
    ServerError:
      description: Unexpected server failure. Re-read state before retrying a write.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: >-
        Temporary key-verification or write-lock infrastructure failure. Retry
        after the indicated delay.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CampaignApplication:
      type: object
      required:
        - id
        - status
        - message
        - createdAt
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - pending
            - reviewing
            - accepted
            - rejected
          description: '`reviewing` means the brand saved the application for later.'
        message:
          type: string
          description: >-
            The message the brand received with the application. May contain
            basic HTML.
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      description: >-
        The body of every error response. Branch on `code`; messages can be
        reworded.
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                Stable, machine-readable reason. New codes may be added;
                existing ones never change meaning.
              enum:
                - INVALID_REQUEST
                - INVALID_QUERY_PARAMETER
                - INVALID_BODY
                - INVALID_ID
                - INVALID_CURSOR
                - INVALID_IDEMPOTENCY_KEY
                - UNAUTHENTICATED
                - MISSING_SCOPE
                - DISCOVER_UNAVAILABLE
                - NOT_ELIGIBLE
                - NOT_FOUND
                - METHOD_NOT_ALLOWED
                - CONFLICT
                - CAMPAIGN_CLOSED
                - IDEMPOTENCY_IN_PROGRESS
                - UNPROCESSABLE
                - IDEMPOTENCY_KEY_REUSED
                - RATE_LIMITED
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
            message:
              type: string
              description: >-
                What went wrong and what to do next, written for a developer or
                agent.
            details:
              description: >-
                Present only when there is something structured to act on, such
                as one entry per invalid field (`{ field, message }`).
  headers:
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Passionfroot API key
      description: >-
        Create an API key from Settings → AI agents & API in an approved Creator
        workspace.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.