---
agentTools:
  projectIndex: https://developers.northpass.com/llms.txt
---

# Bulk enroll people to courses

It takes the payload object with the person_ids and course_ids keys.

    Maximum number of payloads: 15000

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "OpenAPI Specification",
    "version": "1.0.0"
  },
  "paths": {
    "/v2/bulk/people/course": {
      "post": {
        "tags": [
          "Bulk Actions"
        ],
        "summary": "Bulk enroll people to courses",
        "description": "    It takes the payload object with the person_ids and course_ids keys.\n\n    Maximum number of payloads: 15000\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {
                    "type": "object",
                    "properties": {
                      "person_ids": {
                        "type": "array",
                        "example": [
                          "b13ddf6f-7df0-4111-b0bd-2e01b0a613b8",
                          "a63f4012-1759-459b-bb9d-360b303546a8"
                        ],
                        "description": "Payload person ids",
                        "items": {
                          "type": "string"
                        }
                      },
                      "course_ids": {
                        "type": "array",
                        "example": [
                          "f5ed1708-009b-4dea-95c8-d2a20a31fc7d",
                          "0f18959a-20d8-40e2-bc2a-d0c5c5c5ddab"
                        ],
                        "description": "Payload course ids",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "person_ids",
                      "course_ids"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "successful operation",
            "headers": {
              "Content-Type": {
                "x-example-value": "application/json; charset=utf-8",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "x-example-value": "no-cache",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "response": {
                    "value": {
                      "data": {
                        "id": "e4cd831d-dbdc-4ca3-a434-0e78f88f579e",
                        "type": "batch_actions"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "when the user is not an admin",
            "headers": {
              "Content-Type": {
                "x-example-value": "application/json; charset=utf-8",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "x-example-value": "no-cache",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "response": {
                    "value": {
                      "errors": [
                        {
                          "status": "403",
                          "title": "Forbidden",
                          "detail": "You don't have necessary permissions for the resource",
                          "code": "api_error",
                          "source": {}
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "when the body is invalid",
            "headers": {
              "Content-Type": {
                "x-example-value": "application/json; charset=utf-8",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "x-example-value": "no-cache",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "response": {
                    "value": {
                      "errors": [
                        {
                          "status": "422",
                          "title": "Unprocessable Entity",
                          "detail": "Payload must be a Hash",
                          "source": {}
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "X-Api-Key": []
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Bulk Actions"
    }
  ],
  "servers": [
    {
      "url": "https://api.northpass.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Api-Key": {
        "type": "apiKey",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 94,
      "1": 131,
      "2": 105,
      "3": 179,
      "4": 156,
      "5": 162,
      "6": 182,
      "7": 0,
      "8": 57,
      "9": 227,
      "10": 168,
      "11": 70
    }
  }
}
```