The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
hardcode /bulk example for now
Steven Teyc1e36345a35c
diff --git a/.prettierignore b/.prettierignoreindex 5203ec8c73..dbb84aa39a 100644--- a/.prettierignore+++ b/.prettierignore@@ -2,4 +2,5 @@ node_modulespnpm-lock.yaml.next.turbo-dist\ No newline at end of file+dist+apps/docs/api-reference/endpoint/bulk-create-links.mdx\ No newline at end of filediff --git a/apps/docs/api-reference/endpoint/bulk-create-links.mdx b/apps/docs/api-reference/endpoint/bulk-create-links.mdxindex cc93a4deb6..7147c3d0c9 100644--- a/apps/docs/api-reference/endpoint/bulk-create-links.mdx+++ b/apps/docs/api-reference/endpoint/bulk-create-links.mdx@@ -13,3 +13,45 @@ openapi: post /projects/{slug}/links/bulk[Custom social mediacards](https://dub.co/help/article/how-to-create-link#custom-social-media-cards)</Warning>++<RequestExample>+```bash cURL+curl --request POST \+ --url https://api.dub.co/projects/{slug}/links/bulk \+ --header 'Authorization: Bearer {YOUR_TOKEN}' \+ --header 'Content-Type: application/json' \+ --data '[+ {+ "domain": "yourdomain.com",+ "url": "https://www.youtube.com/"+ },+ {+ "domain": "yourdomain.com",+ "url": "https://www.google.com/"+ }+ ...+ ]'+```+```javascript JavaScript+const options = {+ method: 'POST',+ headers: {Authorization: 'Bearer {YOUR_TOKEN}', 'Content-Type': 'application/json'},+ body: JSON.stringify([+ {+ "domain": "yourdomain.com",+ "url": "https://www.youtube.com/"+ },+ {+ "domain": "yourdomain.com",+ "url": "https://www.google.com/"+ },+ ...+ ])+};++fetch('https://api.dub.co/projects/steven/links/bulk', options)+ .then(response => response.json())+ .then(response => console.log(response))+ .catch(err => console.error(err));+```+</RequestExample>\ No newline at end of file