Introduction
ERD tool for Mysql and Postgres
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Authentication
POST api/register
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"user@example.com\",
\"password\": \"Secret1!\"
}"
const url = new URL(
"https://sql-designer.com/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "user@example.com",
"password": "Secret1!"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/login
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"user@example.com\",
\"password\": \"secret\"
}"
const url = new URL(
"https://sql-designer.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "user@example.com",
"password": "secret"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/logout
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/email/resend
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/email/resend" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/email/resend"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Diagrams
Sharing
GET api/diagrams/embed/{token}
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/embed/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/embed/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "No query results for model [App\\Models\\Diagram]."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/diagrams/shared/{token}
requires authentication
PATCH api/diagrams/shared/{token}
requires authentication
POST api/diagrams/{diagram_id}/share
requires authentication
DELETE api/diagrams/{diagram_id}/share
requires authentication
PATCH api/diagrams/{diagram_id}/share
requires authentication
GET api/diagrams/{diagram_id}/visitors
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/3/visitors" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/3/visitors"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/diagrams/{diagram_id}/visitors/{visitor_id}/approve
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/diagrams/3/visitors/2/approve" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/3/visitors/2/approve"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PATCH api/diagrams/{diagram_id}/visitors/{visitor_id}
requires authentication
Example request:
curl --request PATCH \
"https://sql-designer.com/api/diagrams/3/visitors/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/3/visitors/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
CRUD
GET api/diagrams
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/diagrams/{diagram_id}
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/diagrams
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/diagrams" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"My ERD\",
\"db_type\": \"postgresql\"
}"
const url = new URL(
"https://sql-designer.com/api/diagrams"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "My ERD",
"db_type": "postgresql"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/diagrams/{diagram_id}
requires authentication
Example request:
curl --request PUT \
"https://sql-designer.com/api/diagrams/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"My ERD\",
\"db_type\": \"postgresql\"
}"
const url = new URL(
"https://sql-designer.com/api/diagrams/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "My ERD",
"db_type": "postgresql"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/diagrams/{diagram_id}
requires authentication
Example request:
curl --request DELETE \
"https://sql-designer.com/api/diagrams/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SQL
POST api/diagrams/sql/import/{diagram_id}
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/diagrams/sql/import/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/sql/import/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/diagrams/sql/import-status/{diagram_id}
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/sql/import-status/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/sql/import-status/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/diagrams/sql/export/{diagram_id}
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/diagrams/sql/export/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/sql/export/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/diagrams/sql/export-status/{diagram_id}
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/sql/export-status/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/sql/export-status/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/diagrams/json/export/{diagram_id}
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/json/export/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/json/export/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/diagrams/migration/export/{diagram_id}
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/migration/export/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/migration/export/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Changelog
GET api/diagrams/{diagram_id}/changelog
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/diagrams/3/changelog" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/diagrams/3/changelog"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/diagrams/{diagram_id}/changelog
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/diagrams/3/changelog" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"action\": \"vmqeopfuudtdsufvyvddq\"
}"
const url = new URL(
"https://sql-designer.com/api/diagrams/3/changelog"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"action": "vmqeopfuudtdsufvyvddq"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
POST api/feedback
requires authentication
Example request:
curl --request POST \
"https://sql-designer.com/api/feedback" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"user@example.com\",
\"message\": \"I love this tool!\"
}"
const url = new URL(
"https://sql-designer.com/api/feedback"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "user@example.com",
"message": "I love this tool!"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user
requires authentication
Example request:
curl --request GET \
--get "https://sql-designer.com/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://sql-designer.com/api/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://sql-designer.com
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.