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

# Deny campaign application

> Denies a pending application. Same as Reject on the dashboard Applications tab: the creator gets the rejection email. Idempotent: denying an already denied application returns 200 with changed false.

Denies a pending creator application. This does exactly what **Reject** does on the dashboard Applications tab:

* the creator gets the campaign's rejection email
* any pending free sample requests tied to the application are cancelled
* the decision shows in your activity log

A denied application can be reinstated from the dashboard if needed.

<Info>
  Requires a full-access API key (read-only keys are rejected).
</Info>

Only **pending** applications can be denied. Use [List campaign applications](/api-reference/endpoint/list-campaign-applications) to find them. Applications to your child brands' campaigns work too.

**Idempotent**: calling this on an application that is already rejected returns `200` with `"changed": false` and does nothing, so retries are safe. To decide many applications at once, use [Bulk deny](/api-reference/endpoint/bulk-deny-campaign-applications) (up to 50 per request), which also keeps you well inside your hourly request limit.

## Path parameters

| Parameter | Type | Description | Required |
| - | - | - | - |
| `id` | Integer | The application id: `id` from List campaign applications, or `invitation_id` from Create campaign application | Yes |

No request body is needed.

## Request example

```bash theme={"dark"}
curl -X POST "https://api.growi.io/api/public/v1/campaign_applications/98123/deny" \
  -H "Authorization: Bearer YOUR_PUBLIC_API_KEY"
```

## Response example

```json theme={"dark"}
{
  "data": {
    "id": 98123,
    "status": "rejected",
    "campaign_id": 51812,
    "user_id": 45678,
    "campaign_affiliate_id": null,
    "changed": true
  }
}
```

## Response fields

| Field | Type | Description |
| - | - | - |
| `data.id` | Integer | The application id |
| `data.status` | String | `rejected` |
| `data.campaign_id` | Integer | The campaign applied to |
| `data.user_id` | Integer | The creator's Growi user id |
| `data.campaign_affiliate_id` | Integer or null | Always `null` for a denied application |
| `data.changed` | Boolean | `true` when this request denied the application, `false` when it was already rejected |

## Error responses

**401: missing or invalid API key**

```json theme={"dark"}
{ "error": "Not Authenticated" }
```

**403: read-only API key**

```json theme={"dark"}
{ "error": "This API key is read-only and cannot modify data." }
```

**404: application not found for your organization**

```json theme={"dark"}
{ "error": "Application not found." }
```

**422: application is not pending**

Returned when the application was already approved, canceled, or is waiting on payment.

```json theme={"dark"}
{ "error": "Only pending applications can be approved or denied. This application is accepted." }
```

<RequestExample>
  ```bash cURL theme={"dark"}
  curl -X POST "https://api.growi.io/api/public/v1/campaign_applications/98123/deny" \
    -H "Authorization: Bearer YOUR_PUBLIC_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"dark"}
  {
    "data": {
      "id": 98123,
      "status": "rejected",
      "campaign_id": 51812,
      "user_id": 45678,
      "campaign_affiliate_id": null,
      "changed": true
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /campaign_applications/{id}/deny
openapi: 3.0.1
info:
  title: Growi API
  description: >-
    API documentation for Growi platform, showcasing the public tracking event
    endpoint
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.growi.io/api/public/v1
security:
  - bearerAuth: []
paths:
  /campaign_applications/{id}/deny:
    post:
      summary: Deny Campaign Application
      description: >-
        Denies a pending application. Same as Reject on the dashboard
        Applications tab: the creator gets the rejection email. Idempotent:
        denying an already denied application returns 200 with changed false.
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The application id (the `invitation_id` returned when the
            application was created, or `id` from List campaign applications)
          schema:
            type: integer
      responses:
        '200':
          description: Application denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: The application id
                      status:
                        type: string
                        description: accepted or rejected
                      campaign_id:
                        type: integer
                      user_id:
                        type: integer
                        description: The creator's Growi user id
                      campaign_affiliate_id:
                        type: integer
                        nullable: true
                        description: >-
                          The creator's campaign enrollment id after approval;
                          null after a denial
                      changed:
                        type: boolean
                        description: >-
                          false when the application was already in the
                          requested state and nothing was done
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Application not found for your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            The application is not pending, or the campaign is completed or
            canceled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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