How to Create a Project
To create a Project, you must use one of the following mutations based on the desired project type. As a bare minimum, you have to provide the accountId
in which you are creating your Project, a name
for your Project, and a primaryDomain
.
The createProject
mutation has been deprecated and split into four different mutations based on the project type.
Project Types
- Basic: Generate basic crawl metrics and add extensions for custom metrics and reports.
- SEO: Generate SEO reports and metrics to optimize for search engines.
- Accessibility: Generate Accessibility reports and metrics to optimize for inclusive user experiences and compliance with accessibility standards.
- Site Speed: Generate Site Speed reports and metrics to optimize for speed performance.
Basic Project
- Mutation
- Variables
- Response
- cURL
mutation CreateBasicProject($input: CreateProjectInput!) {
createBasicProject(input: $input) {
project {
...ProjectDetails
}
}
}
fragment ProjectDetails on Project {
id
name
primaryDomain
# ...other fields you want to retrieve
}
{
"input": {
"accountId": "TjAwN0FjY291bnQ3MTU",
"name": "www.lumar.io Basic Project",
"primaryDomain": "https://www.lumar.io/"
}
}
{
"data": {
"createBasicProject": {
"project": {
"id": "TjAwN1Byb2plY3Q2MTMz",
"name": "www.lumar.io Basic Project",
"primaryDomain": "https://www.lumar.io/"
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateBasicProject($input: CreateProjectInput!) { createBasicProject(input: $input) { project { ...ProjectDetails } } } fragment ProjectDetails on Project { id name primaryDomain # ...other fields you want to retrieve }","variables":{"input":{"accountId":"TjAwN0FjY291bnQ3MTU","name":"www.lumar.io Basic Project","primaryDomain":"https://www.lumar.io/"}}}' https://api.lumar.io/graphql
Of course, you can pass any of the optional fields at the time of creation. Explore CreateProjectInput
to see what fields are available.
SEO Project
- Mutation
- Variables
- Response
- cURL
mutation CreateSEOProject($input: CreateProjectInput!) {
createSEOProject(input: $input) {
project {
...ProjectDetails
}
}
}
fragment ProjectDetails on Project {
id
name
primaryDomain
# ...other fields you want to retrieve
}
{
"input": {
"accountId": "TjAwN0FjY291bnQ3MTU",
"name": "www.lumar.io SEO Project",
"primaryDomain": "https://www.lumar.io/"
}
}
{
"data": {
"createSEOProject": {
"project": {
"id": "TjAwN1Byb2plY3Q2MTM0",
"name": "www.lumar.io SEO Project",
"primaryDomain": "https://www.lumar.io/"
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateSEOProject($input: CreateProjectInput!) { createSEOProject(input: $input) { project { ...ProjectDetails } } } fragment ProjectDetails on Project { id name primaryDomain # ...other fields you want to retrieve }","variables":{"input":{"accountId":"TjAwN0FjY291bnQ3MTU","name":"www.lumar.io SEO Project","primaryDomain":"https://www.lumar.io/"}}}' https://api.lumar.io/graphql
Of course, you can pass any of the optional fields at the time of creation. Explore CreateProjectInput
to see what fields are available.
Accessibility Project
- Mutation
- Variables
- Response
- cURL
mutation CreateAccessibilityProject($input: CreateAccessibilityProjectInput!) {
createAccessibilityProject(input: $input) {
project {
...ProjectDetails
}
}
}
fragment ProjectDetails on Project {
id
name
primaryDomain
# ...other fields you want to retrieve
}
{
"input": {
"accountId": "TjAwN0FjY291bnQ3MTU",
"name": "www.lumar.io Accessibility Project",
"primaryDomain": "https://www.lumar.io/"
}
}
{
"data": {
"createAccessibilityProject": {
"project": {
"id": "TjAwN1Byb2plY3Q2MTM1",
"name": "www.lumar.io Accessibility Project",
"primaryDomain": "https://www.lumar.io/"
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateAccessibilityProject($input: CreateAccessibilityProjectInput!) { createAccessibilityProject(input: $input) { project { ...ProjectDetails } } } fragment ProjectDetails on Project { id name primaryDomain # ...other fields you want to retrieve }","variables":{"input":{"accountId":"TjAwN0FjY291bnQ3MTU","name":"www.lumar.io Accessibility Project","primaryDomain":"https://www.lumar.io/"}}}' https://api.lumar.io/graphql
Of course, you can pass any of the optional fields at the time of creation. Explore CreateAccessibilityProjectInput
to see what fields are available.
Site Speed Project
- Mutation
- Variables
- Response
- cURL
mutation CreateSiteSpeedProject($input: CreateSiteSpeedProjectInput!) {
createSiteSpeedProject(input: $input) {
project {
...ProjectDetails
}
}
}
fragment ProjectDetails on Project {
id
name
primaryDomain
# ...other fields you want to retrieve
}
{
"input": {
"accountId": "TjAwN0FjY291bnQ3MTU",
"name": "www.lumar.io Site Speed Project",
"primaryDomain": "https://www.lumar.io/"
}
}
{
"data": {
"createSiteSpeedProject": {
"project": {
"id": "TjAwN1Byb2plY3Q2MTM2",
"name": "www.lumar.io Site Speed Project",
"primaryDomain": "https://www.lumar.io/"
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateSiteSpeedProject($input: CreateSiteSpeedProjectInput!) { createSiteSpeedProject(input: $input) { project { ...ProjectDetails } } } fragment ProjectDetails on Project { id name primaryDomain # ...other fields you want to retrieve }","variables":{"input":{"accountId":"TjAwN0FjY291bnQ3MTU","name":"www.lumar.io Site Speed Project","primaryDomain":"https://www.lumar.io/"}}}' https://api.lumar.io/graphql
Of course, you can pass any of the optional fields at the time of creation. Explore CreateSiteSpeedProjectInput
to see what fields are available.