# Add allow/block rules in bulk

## Add allow/block rules to bulk process via a csv file.

> Add allow/block to bulk process via a csv file.

```json
{"openapi":"3.0.3","info":{"title":"Conversations","version":"v1"},"tags":[{"name":"email_allowblock_rules","description":"Manage Allow/Block rules for your inbox"}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"responses":{"conversations.response.allowblock.rule.progress":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations.allowblock.rule.progress"}}},"description":"The Allow/Block rule bulk insert progress."},"error.response.bad_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The request was malformed."}},"schemas":{"conversations.allowblock.rule.progress":{"properties":{"bulkId":{"format":"uuid","type":"string"},"currentIndex":{"type":"integer"},"errors":{"items":{"type":"string"},"nullable":true,"type":"array"},"status":{"enum":["pending","in_progress","completed","failed"],"type":"string"},"total":{"type":"integer"},"updatedAt":{"format":"date-time","type":"string"},"workspaceId":{"format":"uuid","type":"string"}},"type":"object"},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"}}},"paths":{"/workspaces/{workspaceId}/conversation-allowblock-rules-bulk":{"post":{"requestBody":{"required":true,"content":{"text/csv":{"schema":{"type":"string"}}}},"summary":"Add allow/block rules to bulk process via a csv file.","operationId":"emailAllowBlockRulesBulkCsv","description":"Add allow/block to bulk process via a csv file.","tags":["email_allowblock_rules"],"responses":{"202":{"$ref":"#/components/responses/conversations.response.allowblock.rule.progress"},"400":{"$ref":"#/components/responses/error.response.bad_request"}}}}}}
```

## Examples

{% tabs %}
{% tab title="Request" %}

```bash
curl -X POST "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/conversation-allowblock-rules-bulk" \
-H "Content-Type: text/csv" \
-H "Authorization: AccessKey abcd" \
-d 'test@example.com,allow'
```

{% endtab %}

{% tab title="Response (202 - Accepted)" %}

```json
{
  "workspaceId": "6b1908bd-2bc7-409e-bab4-ccfcd3ec69b9",
  "bulkId": "875cd425-d62d-4d16-b3af-61dafe71ea2d",
  "currentIndex": 0,
  "total": 1,
  "status": "pending",
  "errors": null,
  "updatedAt": "2024-11-29T15:45:56.780546536Z"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/conversations-api/api-reference/workspace-settings/add-allow-block-rules-in-bulk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
