# Get a form (/docs/api-reference/forms/get-form)

`GET https://api.coss.com/v1/forms/{id}`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Path parameters

- `id` (string, required): The form's id.

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.forms.get("form_01kd2m8n3p4q5r6s7t8v9w0x1y");
```

HTTP:

```sh
curl -X GET "https://api.coss.com/v1/forms/form_01kd2m8n3p4q5r6s7t8v9w0x1y" \
  -H "Authorization: Bearer $COSS_API_KEY"
```

Python:

```python
from coss import Coss

client = Coss()  # api_key= or COSS_API_KEY

client.forms.get(
    id="form_01kd2m8n3p4q5r6s7t8v9w0x1y",
)
```

Go:

```go
import (
	"context"

	coss "github.com/cosscom/coss-go"
	cossclient "github.com/cosscom/coss-go/client"
)

client := cossclient.NewClient() // option.WithAPIKey(…) or COSS_API_KEY

request := &coss.GetFormsRequest{
    ID: "form_01kd2m8n3p4q5r6s7t8v9w0x1y",
}
client.Forms.Get(
    context.TODO(),
    request,
)
```

Ruby:

```ruby
require "coss"

client = Coss::Client.new # api_key: or COSS_API_KEY

client.forms.get(id: "form_01kd2m8n3p4q5r6s7t8v9w0x1y")
```

PHP:

```php
<?php

use Coss\Coss;

$client = new Coss(); // apiKey: or COSS_API_KEY

$client->forms->get(
    'form_01kd2m8n3p4q5r6s7t8v9w0x1y',
);
```

Java:

```java
import com.coss.Coss;
import com.coss.resources.forms.requests.GetFormsRequest;

Coss client = Coss.builder().build(); // .apiKey(…) or COSS_API_KEY

client.forms().get(
    "form_01kd2m8n3p4q5r6s7t8v9w0x1y",
    GetFormsRequest
        .builder()
        .build()
);
```

.NET:

```csharp
using Coss;

var client = new CossClient(); // apiKey: or COSS_API_KEY

await client.Forms.GetAsync(new GetFormsRequest { Id = "form_01kd2m8n3p4q5r6s7t8v9w0x1y" });
```

## Response 200

The form.

- `object` ("form", required)
- `id` (string, required)
- `name` (string, required)
- `enabled` (boolean, required)
- `endpoint` (string, required): Where the form posts: `<form action=…>`.
- `hosted_url` (string | null, required): The hosted page, when `hosted.enabled`; `null` otherwise.
- `fields` (object[] | null, required)
  - `name` (string, required)
  - `type` ("text" | "email" | "textarea" | "number" | "tel" | "url" | "date" | "select" | "radio" | "checkbox" | "hidden" | "file", required)
  - `label` (string | null, required)
  - `required` (boolean, required)
  - `placeholder` (string | null, required)
  - `options` (string[], required)
  - `max_length` (integer | null, required)
- `strict_fields` (boolean, required)
- `allowed_origins` (string[], required)
- `redirect_url` (string | null, required)
- `spam` (object, required)
  - `honeypot_field` (string, required)
  - `captcha` ("off" | "required", required)
  - `captcha_site_key` (string | null, required)
  - `content_threshold` (number | null, required)
  - `on_review` ("deliver" | "hold", required)
- `submitter` (object, required)
  - `email_field` (string, required)
  - `verify` (boolean, required)
  - `confirmation_from` (string | null, required)
- `notifications` (object, required)
  - `recipients` (string[], required)
  - `from` (string | null, required)
- `contacts` (object, required)
  - `enabled` (boolean, required)
  - `audience_ids` (string[], required)
  - `topics` (string[], required)
  - `double_opt_in` (boolean | null, required)
  - `first_name_field` (string | null, required)
  - `last_name_field` (string | null, required)
  - `properties` (map of string, required)
- `files` (object, required)
  - `enabled` (boolean, required)
  - `max_files` (integer, required)
  - `max_file_bytes` (integer, required)
  - `allowed_types` (string[], required)
- `hosted` (object, required)
  - `enabled` (boolean, required)
  - `title` (string | null, required)
  - `description` (string | null, required)
  - `submit_label` (string | null, required)
  - `success_message` (string | null, required)
  - `published_at` (string | null, required, date-time)
- `disabled_by_admin` (boolean, required): coss.com disabled the form for abuse; contact support.
- `sandbox` (boolean, required)
- `created_at` (string, required, date-time)
- `updated_at` (string, required, date-time)

Example:

```json
{
  "object": "form",
  "id": "form_01kd2m8n3p4q5r6s7t8v9w0x1y",
  "name": "Contact us",
  "enabled": true,
  "endpoint": "https://cossforms.com/f/form_01kd2m8n3p4q5r6s7t8v9w0x1y",
  "hosted_url": null,
  "fields": null,
  "strict_fields": false,
  "allowed_origins": [
    "https://www.example.com"
  ],
  "redirect_url": null,
  "spam": {
    "honeypot_field": "_gotcha",
    "captcha": "off",
    "captcha_site_key": null,
    "content_threshold": 0.9,
    "on_review": "hold"
  },
  "submitter": {
    "email_field": "email",
    "verify": false,
    "confirmation_from": null
  },
  "notifications": {
    "recipients": [
      "support@example.com"
    ],
    "from": null
  },
  "contacts": {
    "enabled": false,
    "audience_ids": [],
    "topics": [],
    "double_opt_in": null,
    "first_name_field": null,
    "last_name_field": null,
    "properties": {}
  },
  "files": {
    "enabled": false,
    "max_files": 3,
    "max_file_bytes": 10485760,
    "allowed_types": []
  },
  "hosted": {
    "enabled": false,
    "title": null,
    "description": null,
    "submit_label": null,
    "success_message": null,
    "published_at": null
  },
  "disabled_by_admin": false,
  "sandbox": false,
  "created_at": "2026-10-29T10:00:00.000Z",
  "updated_at": "2026-10-29T10:00:00.000Z"
}
```

## Errors

- `400`: The `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `404`: No form with this id exists in the API key's environment (`not_found`).
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: Forms isn't available in this deployment yet (`forms_unavailable`).