I’m trying to set up a new project in Jira through the REST API but keep running into issues. When I test my request in Postman, I get a 404 error response. Here’s the JSON payload I’m using:
{
"key": "TESTPROJ",
"name": "Test Project",
"projectTypeKey": "software",
"projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking",
"description": "API Test Project",
"leadAccountId": "",
"url": "",
"assigneeType": "PROJECT_LEAD",
"avatarId": 1200
}
I’m not sure what values should go in the leadAccountId and url fields. Are these required or can they be left empty? Also, which fields are actually mandatory when creating a project through the API? Any help would be appreciated.
The 404 error is likely due to the endpoint URL rather than the payload itself. Make sure you’re using /rest/api/3/project
for cloud or /rest/api/2/project
for server instances. Regarding the fields: leadAccountId is a required field and cannot be left empty; it must contain a valid account ID of an existing user designated as the project lead. You can retrieve this using the user management API. The url field is optional and can be omitted if not needed. For creating a project through the API, the minimum required fields are key, name, projectTypeKey, and leadAccountId. Your projectTemplateKey appears correctly set for basic task tracking. Additionally, verify your authentication headers and base URL as authentication issues can sometimes result in 404 errors when accessing Jira’s API.
Check your permissions first - 404 sometimes means you don’t have project creation rights. leadAccountId def needs a valid user ID, so try using your own account ID for testing. That template key looks way too long too. Try something simpler like ‘com.atlassian.jira-core-project-templates:jira-core-task-management’ or just skip it entirely for basic testing.
I’ve hit this exact problem migrating projects to a new Jira instance. You need a real user account ID in leadAccountId - can’t leave it empty. Get the account ID with a GET request to /rest/api/3/user/search?query=username
or check the user profile in Jira admin. Drop the URL field from your payload if you don’t need it. Also verify your endpoint URL is correct. I’ve seen project creation fail silently on some Jira versions when projectTemplateKey doesn’t match what’s actually available. Hit /rest/api/3/project/type
first to confirm your projectTypeKey works with your setup.