# Perform API call to create a new task

**URL:** <https://community.awork.com/t/perform-api-call-to-create-a-new-task/2245>\
**Category:** Developer Forum\
**Created:** [4. November 2024 um 14:02 UTC](https://community.awork.com/t/perform-api-call-to-create-a-new-task/2245 "2024-11-04T14:02:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![post](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@post](https://community.awork.com/u/post)\
**Post date:** [4. November 2024 um 14:02 UTC](https://community.awork.com/t/perform-api-call-to-create-a-new-task/2245/1 "2024-11-04T14:02:20Z")

</div>

Perform API call to create a new task. With make It with a template only very badly. That’s why I have to use an API call.

However, I am missing three points. Where do I get the information to replace “123e4567-e89b-12d3-a456-426614174000“?

“typeOfWorkId": ‘123e4567-e89b-12d3-a456-426614174000’,  
“taskStatusId": ‘123e4567-e89b-12d3-a456-426614174000’,  
“entityId": ”123e4567-e89b-12d3-a456-426614174000”,

thanks for helping me, Alexander

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/89_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [4. November 2024 um 15:00 UTC](https://community.awork.com/t/perform-api-call-to-create-a-new-task/2245/2 "2024-11-04T15:00:35Z")

</div>

Hi @post, can you explain how you’re making the request?

The `typeOfWorkId` is the Type of Work Id that defines what kind of task this is. You can fetch all configured types of work of your workspaces with this endpoint: `GET /typeofwork`

> **[Gets all types of work. — awork API | Documentation](https://developers.awork.com/apiv1/type-of-work/gets-all-types-of-work)**
>
> Returns all type of work.
> 
> Required Permissions: Any authenticated user.

The `taskStatusId` is the id of the status to create the task in. This id depends on the project you want to create the task for. This is how you can fetch the task statuses for one project: `GET /projects/{projectId}/taskStatuses`

> **[Returns all task statuses of the project with the specified id. — awork API |...](https://developers.awork.com/apiv1/project-tasks/returns-all-task-statuses-of-the-project-with-the-specified-id)**
>
> Returns all task statuses of the project with the specified id.
> To get the task statuses, the user need at least read permissions on feature Project-Master-Data.
> 
> Required Permissions: Any authenticated user.

The `entityId` in this case is the id of the project you want to create the task for.  
There is a detailed explanation here too: [Tasks — awork API | Documentation](https://developers.awork.com/tasks)

Let me know if you have any other questions.
