{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-api/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"GetProject","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"getproject","__idx":0},"children":["GetProject"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Retrieve a specific Project"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"request-parameters","__idx":1},"children":["Request Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["action"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"GetProject\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["projectid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The project id to obtain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-parameters","__idx":2},"children":["Response Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["result"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The result of the operation: success or error"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["projectinfo"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The project data"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tasks"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The project tasks and data"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["messages"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The project messages and data"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request-curl","__idx":3},"children":["Example Request (CURL)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, 'https://www.example.com/includes/api.php');\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_POSTFIELDS,\n    http_build_query(\n        array(\n            'action' => 'GetProject',\n            // See https://developers.whmcs.com/api/authentication\n            'username' => 'IDENTIFIER_OR_ADMIN_USERNAME',\n            'password' => 'SECRET_OR_HASHED_PASSWORD',\n            'projectid' => '1',\n            'responsetype' => 'json',\n        )\n    )\n);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n$response = curl_exec($ch);\ncurl_close($ch);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request-local-api","__idx":4},"children":["Example Request (Local API)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$command = 'GetProject';\n$postData = array(\n    'projectid' => '1',\n);\n$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later\n\n$results = localAPI($command, $postData, $adminUsername);\nprint_r($results);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-response-json","__idx":5},"children":["Example Response JSON"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n    \"projectinfo[id]\": \"1\",\n    \"projectinfo[userid]\": \"1\",\n    \"projectinfo[title]\": \"Test Project\",\n    \"projectinfo[attachments] \": \">\",\n    \"projectinfo[ticketids] \": \">\",\n    \"projectinfo[invoiceids] \": \">\",\n    \"projectinfo[notes] \": \">\",\n    \"projectinfo[adminid]\": \"1\",\n    \"projectinfo[status]\": \"Pending\",\n    \"projectinfo[created]\": \"2016-01-01\",\n    \"projectinfo[duedate]\": \"2016-01-09\",\n    \"projectinfo[completed]\": \"0\",\n    \"projectinfo[lastmodified]\": \"2016-1-02 13:59:01\",\n    \"tasks[task][0][id]\": \"1\",\n    \"tasks[task][0][projectid]\": \"1\",\n    \"tasks[task][0][task]\": \"Task 1\",\n    \"tasks[task][0][notes] \": \">\",\n    \"tasks[task][0][adminid]\": \"0\",\n    \"tasks[task][0][created]\": \"2016-01-02 11:57:57\",\n    \"tasks[task][0][duedate]\": \"0000-00-00\",\n    \"tasks[task][0][completed]\": \"0\",\n    \"tasks[task][0][billed]\": \"0\",\n    \"tasks[task][0][order]\": \"1\",\n    \"tasks[task][0][timelogs][timelog][0][id]\": \"1\",\n    \"tasks[task][0][timelogs][timelog][0][projectid]\": \"1\",\n    \"tasks[task][0][timelogs][timelog][0][taskid]\": \"1\",\n    \"tasks[task][0][timelogs][timelog][0][adminid]\": \"1\",\n    \"tasks[task][0][timelogs][timelog][0][start]\": \"1451739482\",\n    \"tasks[task][0][timelogs][timelog][0][end]\": \"1451743110\",\n    \"tasks[task][0][timelogs][timelog][0][donotbill]\": \"0\",\n    \"tasks[task][0][timelogs][timelog][0][starttime]\": \"2016-01-02 12:58:02\",\n    \"tasks[task][0][timelogs][timelog][0][endtime]\": \"2016-01-02 13:58:30\",\n    \"tasks[task][1][id]\": \"2\",\n    \"tasks[task][1][projectid]\": \"1\",\n    \"tasks[task][1][task]\": \"Task 2\",\n    \"tasks[task][1][notes] \": \">\",\n    \"tasks[task][1][adminid]\": \"0\",\n    \"tasks[task][1][created]\": \"2016-01-02 13:58:01\",\n    \"tasks[task][1][duedate]\": \"0000-00-00\",\n    \"tasks[task][1][completed]\": \"0\",\n    \"tasks[task][1][billed]\": \"0\",\n    \"tasks[task][1][order]\": \"2\",\n    \"tasks[task][1][timelogs]\": \"\",\n    \"messages[message][0][id]\": \"1\",\n    \"messages[message][0][projectid]\": \"1\",\n    \"messages[message][0][date]\": \"2016-10-04 13:59:01\",\n    \"messages[message][0][message]\": \"Message 1\",\n    \"messages[message][0][attachments] \": \">\",\n    \"messages[message][0][adminid]\": \"1\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-responses","__idx":6},"children":["Error Responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Possible error condition responses include:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Project ID Not Set"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Project ID Not Found"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"version-history","__idx":7},"children":["Version History"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Version"},"children":["Version"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Changelog"},"children":["Changelog"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initial Version"]}]}]}]}]}]},"headings":[{"value":"GetProject","id":"getproject","depth":1},{"value":"Request Parameters","id":"request-parameters","depth":3},{"value":"Response Parameters","id":"response-parameters","depth":3},{"value":"Example Request (CURL)","id":"example-request-curl","depth":3},{"value":"Example Request (Local API)","id":"example-request-local-api","depth":3},{"value":"Example Response JSON","id":"example-response-json","depth":3},{"value":"Error Responses","id":"error-responses","depth":3},{"value":"Version History","id":"version-history","depth":3}],"frontmatter":{"title":"GetProject","seo":{"title":"GetProject"}},"lastModified":"2026-08-03T17:00:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/getproject","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}