<commit_before>## Signups

## Create a Signup

```
POST /api/v3/signups
```
  - **campaign_id**: (int|string) required.
    The drupal node id of the campaign the user is signing up for.
  - **campaign_run_id**: (int) optional.
    The drupal campaign run node id of the campaign run the user is signing up for.
  - **why_participated**: (string) optional.
    The reason why the user participated.
  - **source**: (string) optional (for migration purposes, there are signups on prod with no source).
    The source of the signup.
  - **details**: (string) optional
    Details to be added to the "details" column on the signup, such as signed up to receive affiliate messaging.
  - **dont_send_to_blink** (boolean) optional.
    If included and true, the data for this Signup will not be sent to Blink.
  - **created_at**: (string) optional.
    `Y-m-d H:i:s` format. When the signup was created.
  - **updated_at**: (string) optional.
    `Y-m-d H:i:s` format. When the signup was last updated.

Example response:
```
{
    "data": {
        "id": 354,
        "northstar_id": "5589c991a59dbfa93d8b45ae",
        "campaign_id": "362",
        "campaign_run_id": null,
        "quantity": null,
        "created_at": "2017-12-01T19:48:16+00:00",
        "updated_at": "2017-12-01T19:48:16+00:00"
        "why_participated": "to test",
        "source": null,
        "details": null,
    }
}
```

## Retrieve all Signups

```
GET /api/v3/signups
```

Only admins and signup owners will have `why_participated`, `source`, and `details` returned in the response.

When using `?include=posts`, anonymous requests will only return accepted posts. Logged-in users can see accepted posts & any of their own pending or rejected posts. Staff can see anything!

### Optional Query Parameters
- **include** _(string)_
  - Include additional related records in the response: `posts`, `user`
  - If using multiple include params, they must be comma-separated
  - e.g. `/api/v3/signups/1?include=user,posts`
- **filter[column]** _(string)_
  - Filter results by the given column: `northstar_id`, `campaign_id`, `campaign_run_id`
  - You can filter by more than one column, e.g. `/signups?filter[id]=4&filter[campaign_id]=5`
  - You can filter by more than one value for a column, e.g. `/signups?filter[campaign_id]=121,122`<commit_msg>Update docs<commit_after>## Signups

## Create a Signup

```
POST /api/v3/signups
```
  - **campaign_id**: (int|string) required.
    The drupal node id of the campaign the user is signing up for.
  - **campaign_run_id**: (int) optional.
    The drupal campaign run node id of the campaign run the user is signing up for.
  - **why_participated**: (string) optional.
    The reason why the user participated.
  - **source**: (string) optional (for migration purposes, there are signups on prod with no source).
    The source of the signup.
  - **details**: (string) optional
    Details to be added to the "details" column on the signup, such as signed up to receive affiliate messaging.
  - **dont_send_to_blink** (boolean) optional.
    If included and true, the data for this Signup will not be sent to Blink.
  - **created_at**: (string) optional.
    `Y-m-d H:i:s` format. When the signup was created.
  - **updated_at**: (string) optional.
    `Y-m-d H:i:s` format. When the signup was last updated.

Example response:
```
{
    "data": {
        "id": 354,
        "northstar_id": "5589c991a59dbfa93d8b45ae",
        "campaign_id": "362",
        "campaign_run_id": null,
        "quantity": null,
        "created_at": "2017-12-01T19:48:16+00:00",
        "updated_at": "2017-12-01T19:48:16+00:00"
        "why_participated": "to test",
        "source": null,
        "details": null,
    }
}
```

## Retrieve all Signups

```
GET /api/v3/signups
```

Only admins and signup owners will have `why_participated`, `source`, and `details` returned in the response.

When using `?include=posts`, anonymous requests will only return accepted posts. Logged-in users can see accepted posts & any of their own pending or rejected posts. Staff can see anything!

### Optional Query Parameters
- **include** _(string)_
  - Include additional related records in the response: `posts`, `user`, `accepted_quantity`
  - If using multiple include params, they must be comma-separated
  - e.g. `/api/v3/signups/1?include=user,posts`
- **filter[column]** _(string)_
  - Filter results by the given column: `northstar_id`, `campaign_id`, `campaign_run_id`
  - You can filter by more than one column, e.g. `/signups?filter[id]=4&filter[campaign_id]=5`
  - You can filter by more than one value for a column, e.g. `/signups?filter[campaign_id]=121,122`
{'fraction_non_alphanumeric': 0.12883172561629153, 'fraction_numerical': 0.02915326902465166, 'mean_word_length': 3.5344995140913507, 'pattern_counts': {'":': 22, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4304773', 'n_tokens_mistral': 1600, 'n_tokens_neox': 1477, 'n_words': 529}